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
class AppAppBar extends StatelessWidget implements PreferredSizeWidget { | |
final WidgetBuilder? secondaryAction; | |
final bool showBackButton; | |
final String title; | |
final VoidCallback? onBackPressed; | |
final String? popScopeDescription; | |
/// Called when the pop scope is invoked and yes pressed after showYesNoDialog | |
final VoidCallback? onPopScopeDiscard; |
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 { | |
@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
{ | |
"W": 512, | |
"H": 512, | |
"tiling": false, | |
"restore_faces": false, | |
"seed": -1, | |
"sampler": "DPM++ SDE Karras", | |
"seed_resize_from_w": 0, | |
"seed_resize_from_h": 0, | |
"steps": 25, |
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'; | |
import 'package:video_player/video_player.dart'; | |
///Set your video from asset. | |
const String VIDEO_ASSET = 'assets/Butterfly-209.mp4'; | |
void main() { | |
runApp( | |
MaterialApp( | |
home: _App(), |
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:developer'; | |
import 'dart:io'; | |
import 'package:dio/dio.dart'; | |
import 'package:flutter/cupertino.dart'; | |
import 'package:get/get.dart' as getX; | |
import 'package:provider/provider.dart'; | |
import 'package:shared_preferences/shared_preferences.dart'; | |
import 'package:tranzact/revamp/core/api_client/api_exception.dart'; | |
import 'package:tranzact/revamp/core/api_client/api_result.dart'; |
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
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.letstranzact.app"> | |
<uses-permission android:name="android.permission.INTERNET" /> | |
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> | |
<uses-permission android:name="com.google.android.gms.permission.AD_ID" /> | |
<application | |
android:name="com.letstranzact.tranzact.MainApplication" | |
android:icon="@mipmap/ic_launcher" |
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'; | |
const Color darkBlue = Color.fromARGB(255, 18, 32, 47); | |
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
import 'dart:typed_data'; | |
void main() { | |
const t = 99999999999999999999.0; //A big number | |
const step = 18871268712.0; //Random number | |
const max = 999999; | |
//Initialise time for calculating benchmark. | |
var initialTime = DateTime.now().millisecondsSinceEpoch; | |
for (int i = 0; i < max; i++) { |
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() { | |
Foo foo = Foo(); | |
print(foo.fromA); | |
print(foo.fromB); | |
print("====================="); | |
Foo1 foo1 = Foo1(); | |
print(foo1.fromC); | |
print(foo1.fromD); |
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() { | |
var data = {'key': 'value'}; | |
try { | |
var value = data['wrongKey']; | |
print(value); | |
value = data['key']; | |
print(value); | |
print('---------------'); | |
//This is just to simulate an error |
NewerOlder