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
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
final GlobalKey<ScaffoldState> _scaffoldKey = GlobalKey<ScaffoldState>(); | |
@override | |
build(context) { |
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
///This is a learning exaple that discusses the TabBarView Widget and the GridView.count widget too | |
import 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( |
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
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file | |
// for details. All rights reserved. Use of this source code is governed by a | |
// BSD-style license that can be found in the LICENSE file. | |
import 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override |
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
///This file is a random id generator function | |
///consists of 10 random alphabetics and numbers | |
///copyrights 2020 reserved for [Mohammed Salem] | |
/// * Flutter Developer and UI Designer | |
import 'dart:math'; | |
void main() { | |
var id = ''; |
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
///THIS FILE IS TO PLAY WITH THE DATETIME CLASS PROPERTIES | |
///FIRTST WRITTEN IN 20-3-2020 | |
void main() { | |
var ct = DateTime.now(); | |
print("Egypt Now: ${ct.toLocal()}"); | |
print("UTC TIME ZONE NOW: ${ct.toUtc()}"); | |
print("Time zone offset in Egypt: ${ct.timeZoneOffset.inHours} hours"); | |
} |
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
void main(){ | |
String rawData="05:26"; | |
int hours=int.parse(rawData.split(":")[0]); | |
int minutes=int.parse(rawData.split(":")[1]); | |
print("hours: $hours"); | |
print("minutes: $minutes"); | |
} |