This file contains 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
Column( | |
children: <Widget>[ | |
Container( | |
color: Colors.blue, | |
height: 100, | |
width: 100, | |
), | |
Expanded( | |
child: Container( | |
color: Colors.amber, |
This file contains 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
Stack( | |
children: <Widget>[ | |
Container( | |
width: 100, | |
height: 100, | |
color: Colors.red, | |
), | |
Container( | |
width: 90, | |
height: 90, |
This file contains 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
Container( | |
constraints: BoxConstraints.expand( | |
height: Theme.of(context).textTheme.headline4.fontSize * 1.1 + 200.0, | |
), | |
padding: const EdgeInsets.all(8.0), | |
color: Colors.blue[600], | |
alignment: Alignment.center, | |
child: Text('Hello World', | |
style: Theme.of(context) | |
.textTheme |
This file contains 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
Column( | |
children: <Widget>[ | |
Text('Flutter Child One'), | |
Text('Flutter Child Two'), | |
Expanded( | |
child: FittedBox( | |
fit: BoxFit.contain, // this is simple image | |
child: const FlutterLogo(), | |
), | |
), |
This file contains 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
Row( | |
children: <Widget>[ | |
Expanded( | |
child: Text('Flutter Child One', textAlign: TextAlign.center), | |
), | |
Expanded( | |
child: Text('Flutter Child Two', textAlign: TextAlign.center), | |
), | |
Expanded( | |
child: FittedBox( |
This file contains 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
Text( | |
'Hello, guys! Flutter is beautiful', | |
textAlign: TextAlign.center, | |
overflow: TextOverflow.ellipsis, | |
style: TextStyle(fontWeight: FontWeight.bold), | |
) |
This file contains 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
apply plugin: 'com.android.application' | |
apply plugin: 'kotlin-android' | |
apply plugin: 'kotlin-android-extensions' | |
android { | |
compileSdkVersion 29 | |
defaultConfig { | |
applicationId "com.askfortricks.mvvmnavcontrol" |
This file contains 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
name: app_name | |
description: A new Flutter application. | |
version: 1.0.0+1 | |
environment: | |
sdk: ">=2.0.0-dev.68.0 <3.0.0" | |
dependencies: | |
flutter: |
This file contains 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
splits { | |
// Configures multiple APKs based on ABI. | |
abi { | |
// Enables building multiple APKs per ABI. | |
enable true | |
// By default all ABIs are included, so use reset() and include to specify that we only | |
// want APKs for armeabi-v7a and arm64-v8a. | |
// Resets the list of ABIs that Gradle should create APKs for to none. | |
reset() |
This file contains 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 Bicycle { | |
int cadence; | |
int _speed = 0; | |
//we have made speed as read only so we will just use get below to read its value. | |
//we will update its value using _speed variable.(work as setter) | |
// and to print the speed value (use _speed which always gets the latest speed value) | |
int get speed => _speed; | |
int gear; |