Skip to content

Instantly share code, notes, and snippets.

@faizan1947
faizan1947 / update.json
Last active August 14, 2023 11:16
update
{
"name":"Filer",
"version":"1.0.2",
"date":"3 Jul 2020",
"desc":"made some Improvements, addded Google Auth",
"download":"https://drive.google.com/file/d/1y0lVJswwk95N3lkS1Gr2on5wtC6uCBoi/view?usp=drivesdk"
}
@faizan1947
faizan1947 / realtimeDB.dart
Last active August 4, 2023 12:35
realtimeDB
import 'package:flutter/material.dart';
import 'package:firebase_database/firebase_database.dart';
import 'package:flutter/services.dart';
import 'package:link_preview_generator/link_preview_generator.dart';
// {
// "groups": {
// "group1": {
// "links": {
// "link1": {
// "title": "Link 1 Title",
@faizan1947
faizan1947 / inkWellBtn.dart
Created April 21, 2023 11:43
Flutter Inkwell Button
Material(
type: MaterialType.transparency,
child: InkWell(
onTap: () {
print('tapped');
},
child: Ink(
height: 60,
width: 200,
decoration: BoxDecoration(
@faizan1947
faizan1947 / main.dart
Created January 5, 2023 14:03
dart-mixin
void main() {
Duck().fly();
Duck().swim();
Duck().move();
}
class Animal{
void move(){
print('moving position');
}
@faizan1947
faizan1947 / main.dart
Created August 19, 2022 07:14
for loop challenge
List<int> winningNumbers = [12, 6, 34, 22, 41, 9];
void main() {
List<int> ticket1 = [45, 2, 9, 18, 12, 33];
List<int> ticket2 = [41, 17, 26, 32, 7, 35];
checkNumbers(ticket2);
@faizan1947
faizan1947 / main.dart
Created August 19, 2022 03:18
for loop-dart
void main() {
buyMilk(10);
}
void buyMilk(int days){
@faizan1947
faizan1947 / main.dart
Created July 22, 2022 10:42
Function as first order object
void main() {
//Crate Car object
Car myCar = Car(drive: slowDrive);
//myCar.drive!();
//Now lets say upgrade car
void main() {
int age = 123;
bool canBuySharab = age>21? true: false;
print(canBuySharab);
}
void main() {
Car myCar = Car(carStyle: CarType.convertible);
}
@faizan1947
faizan1947 / main.dart
Last active July 16, 2022 07:14
Polymorphism
void main() {
//Object
var selfCar = SelfDrivingCar(destination: 'Lasani colony');
selfCar.run();
}
class Car {
int seats = 4;