This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'package:hive_flutter/hive_flutter.dart'; | |
| /** | |
| * Generic adapter for enum classes. | |
| */ | |
| class EnumClassAdapter<T extends Enum> extends TypeAdapter<T> { | |
| EnumClassAdapter(this.typeId, this.values); | |
| static const int _numberOfFields = 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'package:flutter/material.dart'; | |
| mixin AppLifecycleAware<T extends StatefulWidget> on State<T> { | |
| late final AppLifecycleListener _listener; | |
| @override | |
| void initState() { | |
| super.initState(); | |
| _listener = AppLifecycleListener( | |
| onDetach: onDetach, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'package:flutter/material.dart'; | |
| class _ClampingScrollBehavior extends ScrollBehavior { | |
| @override | |
| ScrollPhysics getScrollPhysics(BuildContext context) => | |
| const ClampingScrollPhysics(); | |
| } | |
| class NonScrollableRefreshIndicator extends StatelessWidget { | |
| final Widget child; |