Skip to content

Instantly share code, notes, and snippets.

View mhmzdev's full-sized avatar
🎯
Focused!

Muhammad Hamza mhmzdev

🎯
Focused!
View GitHub Profile
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: HomePage(),
@mhmzdev
mhmzdev / main.dart
Created April 3, 2020 11:03
rowWidgetAdded
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: HomePage(),
@mhmzdev
mhmzdev / main.dart
Created April 3, 2020 11:09
containerWidget
Container(
height: 500,
margin: EdgeInsets.symmetric(horizontal: 10),
child: Center(child: Text('Tasks Will be placed here!')),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(12),
border: Border.all(color: !darkTheme ? Colors.black38 : Colors.white),
boxShadow: [
BoxShadow(
@mhmzdev
mhmzdev / main.dart
Last active April 3, 2020 12:08
fab
floatingActionButton: FloatingActionButton(
onPressed: () {},
backgroundColor: Colors.white
child: Icon(
Icons.add,
color: Colors.black
size: 25,
),
),
@mhmzdev
mhmzdev / main.dart
Created April 3, 2020 11:21
darkApplied
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
class SecondScreen extends StatelessWidget {
final darkThemeSecondScreen;
SecondScreen({this.darkThemeSecondScreen});
@override
Widget build(BuildContext context) {
return Scaffold(
body: SafeArea(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 10),
child: Column(
FlatButton (
onPressed: () {
Navigator.of(context).pop();
},
child: Icon(Icons.arrow_back, color: !darkThemeSecondScreen ? Colors.black : Colors.white, size: 30,),
),
Text (
'New Task',
style: TextStyle(
color: !darkThemeSecondScreen ? Colors.black : Colors.white,
fontSize: 32,
fontWeight: FontWeight.bold),
),
TextField(
controller: _myController,
decoration: InputDecoration(
hintText: 'Write Something...'
),
),
@mhmzdev
mhmzdev / secondscreen.dart
Last active April 4, 2020 05:43
raised button
Center(
child: RaisedButton(
onPressed: (){},
color: Colors.white,
shape: StadiumBorder(),
child: Text('Add', style: TextStyle(color: darkThemeSecondScreen ? Colors.black : null),),
elevation: 3,
),
)