Skip to content

Getting Started

FrenkyDema edited this page Aug 29, 2024 · 3 revisions

Introduction

Welcome to Risto Widgets! This library offers a collection of custom Flutter widgets designed to simplify and enhance your app development experience. This guide will walk you through the installation and basic usage of the risto_widgets package.

Installation

1. Add Dependency

To start using risto_widgets, add it to your project's pubspec.yaml file:

dependencies:
  flutter:
    sdk: flutter
  risto_widgets: ^1.0.0

Replace ^1.0.0 with the latest version if needed.

2. Install the Package

Run the following command in your terminal to install the package:

flutter pub get

Importing the Package

Once installed, you can import risto_widgets into your Dart files:

import 'package:risto_widgets/risto_widgets.dart';

Basic Usage

Here’s an example of how to use one of the widgets from the risto_widgets package:

Custom Action Button Example

import 'package:flutter/material.dart';
import 'package:risto_widgets/risto_widgets.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text('Risto Widgets Example'),
        ),
        body: Center(
          child: CustomActionButton(
            onPressed: () {
              print('Button Pressed');
            },
            backgroundColor: Colors.blue,
            child: Text('Click Me'),
          ),
        ),
      ),
    );
  }
}

ListTile Button Example

ListTileButton(
  body: Text('This is a ListTile Button'),
  onPressed: () {
    print('ListTile Button Pressed');
  },
  leading: Icon(Icons.info),
  trailing: Icon(Icons.arrow_forward),
);

Detailed Documentation

Each widget in the risto_widgets library has its own page with detailed documentation, including usage examples, properties, and constructors. Be sure to explore the Widgets section of the Wiki for more information.

Support

If you encounter any issues or have questions, feel free to open an issue on the GitHub repository.

Next Steps

  • Explore the Examples page to see more ways to use the risto_widgets in your projects.