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
| /// Mixin containing a helper list method | |
| mixin ListDistinct { | |
| /// Creates a new list with the unique elements form [listOne] and [listTwo]. | |
| /// The new list is returned with the specified type [T] | |
| List<T> distinct<T>(List<T> listOne, List<T> listTwo) { | |
| final List<T> _newList = <T>[]; | |
| _newList.addAll(listOne); | |
| for (final T item in listTwo) { | |
| if (_newList.contains(item)) { | |
| _newList.remove(item); |
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(MyApp()); | |
| class MyApp extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| return MaterialApp( | |
| title: 'Nested tab bar list demo', | |
| theme: 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
| import 'package:flutter/cupertino.dart' show CupertinoPageRoute; | |
| import 'package:flutter/material.dart'; | |
| void main() { | |
| runApp( | |
| MaterialApp( | |
| home: HomePage(), | |
| ), | |
| ); | |
| } |
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 ItemTextStyle { | |
| const ItemTextStyle({ | |
| @required this.initialStyle, | |
| @required this.animatedStyle, | |
| }); | |
| final TextStyle initialStyle; | |
| final TextStyle animatedStyle; |
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_web/material.dart'; | |
| class ResponsiveLayout extends StatelessWidget { | |
| const ResponsiveLayout({ | |
| Key key, | |
| @required this.largeChild, | |
| this.mediumChild, | |
| this.smallChild, | |
| this.largeBreakPoint = 1200.0, | |
| this.mediumBreakPoint = 800.0, |
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 ConstrainedView extends StatelessWidget { | |
| const ConstrainedView({Key key, this.child}) : super(key: key); | |
| final Widget child; | |
| @override | |
| Widget build(BuildContext context) { | |
| return LayoutBuilder( |
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(MyApp()); | |
| class MyApp extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| return MaterialApp( | |
| theme: 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
| import 'package:flutter/material.dart'; | |
| class StepperWidget extends StatelessWidget { | |
| const StepperWidget({ | |
| Key key, | |
| @required this.tabController, | |
| @required this.headings, | |
| @required this.textStyle, | |
| this.height = 48.0, |
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 ShadowCard extends StatelessWidget { | |
| const ShadowCard({ | |
| Key key, | |
| this.color, | |
| this.elevation = 1.0, | |
| this.shape, | |
| this.margin = const EdgeInsets.all(4.0), | |
| this.clipBehavior = Clip.none, | |
| this.child, | |
| this.semanticContainer = true, |