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
| /// You can run this code in Dartpad at https://www.dartpad.dev/6bddcfd50410c7537770cddbf1b637dc | |
| import 'package:flutter/material.dart'; | |
| /// The only think that belongs in main is runapp. Normally, this | |
| /// would be in its own file. | |
| void main() { | |
| runApp(const MyApp()); | |
| } |
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) 2020 Scott Stoll | |
| // | |
| // 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'; | |
| class VnsObject{ | |
| /// First, declare / instantiate any private class members | |
| static final List<Color> _colors = [ | |
| Colors.white, | |
| Colors.yellow, | |
| Colors.orange, | |
| Colors.purple, |
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
| FixedExtentScrollController fixedExtentScrollController = | |
| new FixedExtentScrollController(); | |
| ListWheelScrollView( | |
| controller: fixedExtentScrollController, | |
| physics: FixedExtentScrollPhysics(), | |
| children: monthsOfTheYear.map((month) { | |
| return Card( | |
| child: Row( | |
| children: <Widget>[ | |
| Expanded( |
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 GutsOfMyPage extends StatelessWidget { | |
| const GutsOfMyPage({ | |
| Key key, | |
| @required int counter, | |
| }) : _counter = counter, super(key: key); | |
| final int _counter; |
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
| final Widget box_constraints_forces_an_infinite_height_or_width = | |
| Column( | |
| children: <Widget>[ | |
| Container( | |
| width: double.infinity, | |
| ), | |
| ], | |
| ); |
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
| void main() { | |
| runApp( | |
| Column( | |
| mainAxisSize: MainAxisSize.min, | |
| children: <Widget>[ | |
| Flexible( | |
| fit: FlexFit.loose, | |
| child: Container( | |
| color: Colors.blue, | |
| height: 100, |
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
| Widget brokenCodeRenderFlexError = | |
| Column( | |
| // A Column's default is "mainAxisSize: MainAxisSize.max," | |
| // This means it will try to take all the height it's allowed to. | |
| children: <Widget>[ | |
| // The container is trying to be infinitely large. | |
| Container( | |
| height: double.infinity, | |
| color: Colors.green, | |
| ), |
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
| Expanded({ | |
| Key key, | |
| int flex = 1, | |
| @required Widget child, | |
| }) : super( | |
| key: key, | |
| flex: flex, | |
| fit: FlexFit.tight, | |
| child: child, | |
| ); |
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
| final Widget render_constrained_box_object_was_given_an_infinite_size_during_layout = | |
| Column( | |
| children: <Widget>[ | |
| Row( | |
| children: <Widget>[ | |
| Container( | |
| child: SizedBox( | |
| height: double.infinity, | |
| ), | |
| ), |
NewerOlder