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
<!DOCTYPE html> | |
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" lang="en"> | |
<head> | |
<title></title> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<!--[if mso]><xml><o:OfficeDocumentSettings><o:PixelsPerInch>96</o:PixelsPerInch><o:AllowPNG/></o:OfficeDocumentSettings></xml><![endif]--> | |
<style> | |
* { |
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
<div class="clean-body" style="margin: 0; padding: 0; -webkit-text-size-adjust: 100%; background-color: #dde4ea;"> | |
<!--[if IE]><div class="ie-browser"><![endif]--> | |
<table class="nl-container" style="table-layout: fixed; vertical-align: top; min-width: 320px; border-spacing: 0; border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; background-color: #dde4ea; width: 100%;" cellpadding="0" cellspacing="0" role="presentation" width="100%" bgcolor="#dde4ea" valign="top"> | |
<tbody> | |
<tr style="vertical-align: top;" valign="top"> | |
<td style="word-break: break-word; vertical-align: top;" valign="top"> | |
<!--[if (mso)|(IE)]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td align="center" style="background-color:#dde4ea"><![endif]--> | |
<div style="background-color:transparent;"> | |
<div class="block-grid " style="min-width: 320px; max-width: 640px; overflow-wrap: break-word; word-wrap: break-word; word-break: break-word; Margin: 0 auto; background-color: #ffffff;"> |
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
python -m ensurepip |
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
FocusScope.of(context).unfocus() |
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() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
final _notifier = ValueNotifier<ThemeModel>(ThemeModel(ThemeMode.light)); | |
@override | |
Widget build(BuildContext context) { | |
return ValueListenableBuilder<ThemeModel>( | |
valueListenable: _notifier, | |
builder: (_, model, __) { |
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
Image.network( | |
image, | |
fit: BoxFit.cover, | |
loadingBuilder: (context, child, loadingProgress) { | |
return (loadingProgress == null) | |
? child | |
: Center( | |
child: SizedBox( | |
height: 40.0, | |
width: 40.0, |
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
final CollectionReference items = FirebaseFirestore.instance.collection('Orders'); | |
final body = StreamBuilder<QuerySnapshot>( | |
stream: items.snapshots(), | |
builder: (BuildContext context, AsyncSnapshot<QuerySnapshot> snapshot) { | |
if (snapshot.hasError) { | |
return Container( | |
child: Center( | |
child: Text('SOME ERROR HAS OCCURED'), | |
), |
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
//Initialising as 'loading..' because text widget (where you'll be using these variables) can't be null | |
String firstName = 'loading...' | |
String lastName = 'loading...' | |
String title = 'loading...' | |
class Screen extends StatefulWidget { | |
@override | |
_ScreenState createState() => _ScreenState(); | |
} |
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 'dart:js' as js; | |
//OR | |
import 'dart:html' as html; | |
onPressed: () { | |
js.context.callMethod('open', ['https://play.google.com/store']); | |
//OR | |
html.window.open('https://play.google.com/store', 'new tab'); | |
}, |
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
// Create "ScrollController" | |
final ScrollController scrollController = ScrollController(); | |
// Add "scrollController" to "controller" property inside Scroll widget | |
controller: scrollController, | |
// Now implement scrolling function | |
void onTap(){ | |
scrollController.animateTo(0, duration: Duration(seconds: 2), curve: Curves.easeInOut); | |
// 0 is the offset |
NewerOlder