wonders/lib/ui/app_scaffold.dart

29 lines
858 B
Dart
Raw Normal View History

2022-08-29 20:38:28 -06:00
import 'package:wonders/common_libs.dart';
import 'package:wonders/ui/common/app_scroll_behavior.dart';
class WondersAppScaffold extends StatelessWidget with GetItMixin {
WondersAppScaffold({Key? key, required this.child}) : super(key: key);
final Widget child;
@override
Widget build(BuildContext context) {
Animate.defaultDuration = $styles.times.fast;
return Stack(
children: [
Theme(
data: $styles.colors.toThemeData(),
// Provide a default texts style to allow Hero's to render text properly
child: DefaultTextStyle(
style: $styles.text.body,
// Use a custom scroll behavior across entire app
child: ScrollConfiguration(
behavior: AppScrollBehavior(),
child: child,
),
),
),
],
);
}
}