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
//Push to next page | |
Navigator.push(context, CupertinoPageRoute(builder: (context) => ClientPhoneNumber())); | |
//Back to next page | |
Navigator.pop(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
DecoratedBox( | |
//Add Color | |
color: Theme.of(context).primaryColor, | |
//Add Image | |
decoration: BoxDecoration( | |
image: DecorationImage(image: AssetImage('images/backgroundImage.png'), fit: BoxFit.cover), | |
) | |
//Add Specific Border | |
borderRadius: BorderRadius.only( |
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
GridView.builder( | |
physics: const NeverScrollableScrollPhysics(), | |
shrinkWrap: true, | |
itemCount: 6, | |
gridDelegate: | |
new SliverGridDelegateWithFixedCrossAxisCount( | |
crossAxisCount: 3), | |
itemBuilder: (BuildContext context, int index) { | |
return ServicesItem(); | |
}); |
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 AppStateDemo extends StatefulWidget { | |
AppStateDemo() : super(); | |
final String title = "AppState Demo"; | |
@override | |
AppStateDemoState createState() => AppStateDemoState(); | |
} |
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
//Simple AppBar | |
Widget appBar = AppBar( | |
title: Text("Title", | |
style: TextStyle( | |
color: Colors.white, | |
fontWeight: FontWeight.bold, | |
fontFamily: "Roboto", | |
fontSize: 25.0),), | |
//Add Multiple Right Buttons | |
actions: <Widget>[ |
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
//Basic ListView | |
ListView( | |
children: <Widget>[ | |
Text('User Name', style: TextStyle(fontSize: 16),), | |
Text('Gender', style: TextStyle(fontSize: 16),), | |
Text('Mobile Number', style: TextStyle(fontSize: 16),), | |
], | |
) | |
//ListView With Data Mapping |
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 CustomListTile extends StatelessWidget { | |
final Widget leading; | |
final String title; | |
final String subTitle; | |
final Widget trailing; | |
final VoidCallback onTap; | |
CustomListTile({this.leading, this.title, this.subTitle, this.trailing, this.onTap}); | |
@override | |
Widget build(BuildContext context) { | |
return InkWell( |
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
let <#variable#> = UITapGestureRecognizer(target: self, action: #selector(self.tapGuesture(_:))) | |
<#variable#> .numberOfTapsRequired = 1; | |
self.<#objectOutlet#> .addGestureRecognizer(<#variable#> ) | |
self.<#objectOutlet#>.tag = 0 | |
self.<#objectOutlet#>.isUserInteractionEnabled = true | |
NewerOlder