fl_utilities 1.0.0 fl_utilities: ^1.0.0 copied to clipboard
Simple flutter utilities such as shorthands extension on BuildContext, debounce extension on ValueChanged, SizedScrollableArea widget, and more.
fl_utilities #
Simple flutter utilities such as shorthands extension on [BuildContext],
debounce
extension on [ValueChanged],SizedScrollableArea
widget, and more.
This package depend on SDKs so it can be used in any Flutter project.
Getting started #
Add fl_utilities
to your dependencies.
flutter add fl_utilities
or manually add it to your pubspec.yaml
file:
dependencies:
fl_utilities: ^1.0.0
Then you can use it in your project.
Usage #
shorthands extension on [BuildContext]:
import 'package:flutter/material.dart';
import 'package:fl_utilities/fl_utilities.dart';
Builder(builder: (context) {
context.theme; // instead of `Theme.of(context)`
context.mediaQuery; // instead of `MediaQuery.of(context)`
return const Placeholder();
});
debounce extension on [ValueChanged]:
import 'package:flutter/material.dart';
import 'package:fl_utilities/fl_utilities.dart';
TextField(
onChanged: (text) {
debugPrint('Called after half a second of not typing');
}.debounce(),
);
Visit API Reference for more utilities.