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'; | |
// Import transparent_image in pubspec.yaml file | |
import 'package:transparent_image/transparent_image.dart'; | |
void main() { | |
runApp(MyPortfolio()); | |
} | |
class MyPortfolio extends StatelessWidget { | |
@override |
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'; | |
@immutable | |
class ClipShadowPath extends StatelessWidget { | |
final BoxShadow shadow; | |
final CustomClipper<Path> clipper; | |
final Widget child; | |
ClipShadowPath({ | |
@required this.shadow, |
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
void main() { | |
Provider.debugCheckInvalidValueType = null; | |
runApp(MyAppExample()); | |
} | |
class MyAppExample extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
home: MultiProvider(providers: [ |
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
NeumorphicBar( | |
width: 200, | |
height: 400, | |
value: 0.9, | |
text: 'Tue', | |
color: Color.fromRGBO(0, 200, 156, 1), | |
), | |
class NeumorphicBar extends StatelessWidget { | |
const NeumorphicBar({ |
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 'dart:async'; | |
import 'dart:html'; | |
import 'package:flutter/material.dart'; | |
import 'package:firebase/firebase.dart' as fb; | |
import 'package:firebase/firestore.dart' as fs; | |
import 'package:linktree_demo_clone/linktree.dart'; | |
class Settings extends StatefulWidget { | |
@override |
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
firestore.collection('names').add({'text': 'happyharis'}); // create | |
firestore.collection('names').doc('111').get(); // read | |
firestore.collection('names').doc('111').update(data:{'text': 'thehappyharis'}); // update | |
firestore.collection('names').doc('111').delete(); // delete |
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:firebase/firebase.dart' as Firebase; | |
Future<void> main() async { | |
if (Firebase.apps.isEmpty) { | |
print(Firebase.apps); | |
Firebase.initializeApp( | |
apiKey: '', | |
authDomain: '', | |
databaseURL: '', | |
projectId: '', |
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 RestaurantBloc { | |
RestaurantBloc() { | |
chef.stream.listen(cookOrder); | |
} | |
String cookedFood; | |
final waiter = StreamController(); | |
Sink get tray => waiter.sink; | |
Stream get deliverFood => waiter.stream; |
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 RestaurantBloc implements BlocBase { | |
RestaurantBloc() { | |
chef.stream.listen(cookOrder); | |
} | |
String currentOrder; | |
final waiter = StreamController(); | |
Sink get tray => waiter.sink; | |
Stream get deliverFood => waiter.stream; |