Skip to content

Instantly share code, notes, and snippets.

View mohammedsalem97's full-sized avatar

Mohammed Salem mohammedsalem97

  • https://www.midade.com
  • Egypt
View GitHub Profile
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
final GlobalKey<ScaffoldState> _scaffoldKey = GlobalKey<ScaffoldState>();
@override
build(context) {
///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(
@mohammedsalem97
mohammedsalem97 / main.dart
Created February 20, 2020 22:19
ListWheelScrollView Example
// 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
@mohammedsalem97
mohammedsalem97 / main.dart
Created March 16, 2020 23:45
Random ID Generator
///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 = '';
@mohammedsalem97
mohammedsalem97 / main.dart
Created March 19, 2020 23:46
THIS FILE IS TO PLAY WITH THE DATETIME CLASS PROPERTIES
///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");
}
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");
}