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
| // MIT License | |
| // | |
| // Copyright (c) 2022 Fré Dumazy & Simon Lightfoot | |
| // | |
| // Permission is hereby granted, free of charge, to any person obtaining a copy | |
| // of this software and associated documentation files (the "Software"), to deal | |
| // in the Software without restriction, including without limitation the rights | |
| // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| // copies of the Software, and to permit persons to whom the Software is | |
| // furnished to do so, subject to the following conditions: |
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'; | |
| import 'package:flutter/rendering.dart'; | |
| void main() => runApp(const ExampleApp()); | |
| class ExampleApp extends StatelessWidget { | |
| const ExampleApp({super.key}); | |
| @override | |
| Widget build(BuildContext context) { |
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'; | |
| void main() { | |
| runApp(const MyApp()); | |
| } | |
| class MyApp extends StatelessWidget { | |
| const MyApp({super.key}); | |
| @override |
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
| Scrollable( | |
| axisDirection: AxisDirection.right, | |
| controller: _pageController, | |
| physics: const PageScrollPhysics(parent: ClampingScrollPhysics()), | |
| viewportBuilder: (BuildContext context, ViewportOffset offset) { | |
| return LayoutBuilder( | |
| builder: (context, constraints) { | |
| offset.applyViewportDimension(constraints.maxWidth); | |
| offset.applyContentDimensions(0.0, constraints.maxWidth); | |
| return AnimatedBuilder( |
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 'dart:ui'; | |
| import 'package:flutter/cupertino.dart'; | |
| import 'package:flutter/material.dart'; | |
| void main() { | |
| runApp(MyApp()); | |
| } | |
| class MyApp extends StatelessWidget { |
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'; | |
| import 'package:meta/meta.dart'; | |
| const List<TabItem> TabItems = const <TabItem>[ | |
| const TabItem(title: 'Home', icon: Icons.home), | |
| const TabItem(title: 'Gallery', icon: Icons.image), | |
| const TabItem(title: 'Settings', icon: Icons.settings) | |
| ]; | |
| class MyApp extends StatefulWidget { |
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'; | |
| void main() => runApp(new MyApp()); | |
| class MyApp extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| return new MaterialApp( | |
| title: 'Flutter Demo', | |
| theme: new ThemeData( |
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
| class FadeRoute<T> extends MaterialPageRoute<T> { | |
| final bool fadeInitialRoute; | |
| FadeRoute({ builder, settings, maintainState, fullscreenDialog, this.fadeInitialRoute = true}) | |
| : super(builder: builder, settings: settings, maintainState: maintainState, fullscreenDialog: fullscreenDialog); | |
| @override | |
| bool get opaque => false; | |
| @override |
NewerOlder