fast is a Flutter package designed to provide a collection of essential widgets, utilities, and boilerplate code to accelerate the development of new Flutter applications. It stands for Flutter App Startup Toolkit.
-
Provides common UI widgets to speed up development.
-
Includes utility functions for frequent tasks.
-
Aims to simplify project setup and common integrations.
-
Included widgets:
FastButton: A customizable button widget.FastText: A styled text widget.FastImage: An image widget with caching support.FastCard: A card widget with shadow and border support.ExpandableText: A text widget that expands on tap.
-
Included utilities:
Failure: A set of Failure classes for handling errors.
-
Included extensions:
BuildContextExtensions: Extensions forBuildContextto rapidly access theme, media query, locale, text direction and scaffold state. Also provides common screen sizes for responsive design.StringExtensions: Extensions forStringto handle common string operations like capitalization and formatting.ColorsExtensions: Extensions forColorto provide common color operations.DateTimeExtensions: Extensions forDateTimeto handle common date operations.ResponseExtensions: Extensions for Dio'sResponseto handle common response cases.
-
Included enums:
HttpMethods: Enum for common HTTP methods.
-
Included data layer handling utils:
NetworkDatasource: A base class to use on all other data sources. It handles network requests and responses.TokenRefreshInterceptor: An interceptor for Dio to handle token refresh logic and request queueing.
This project is a Flutter package. To use it in your Flutter application, follow these instructions.
- Flutter SDK:
>=1.17.0 - Dart SDK:
^3.6.2
-
Add
fastto yourpubspec.yamlfile:dependencies: flutter: sdk: flutter fast: ^0.0.1 # Replace with the latest version
-
Install the package by running the following command in your project's root directory:
flutter pub get
-
Import the package in your Dart code where you want to use it:
import 'package:fast/fast.dart';
After installation, you can start using the widgets and utilities provided by fast.