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:async'; | |
extension FutureX<T> on Future<T> { | |
/// This function accepts two functions returning a future, | |
/// and returns whichever function resolves successfully first. | |
/// | |
/// Can be used in case one of the functions may fail | |
/// even under normal circumstances as long as the other succeeds | |
/// (so at least one of them should succeed). | |
/// |
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
// This gist is part of the https://github.com/dartsidedev/gists repository. | |
// There, you'll find further information about this gist. | |
// https://github.com/dartsidedev/gists#3cd82881966c0e1314504e4e2e54e373 | |
import 'package:flutter/material.dart'; | |
void main() => runApp(PopupDemo()); | |
class PopupDemo extends StatefulWidget { | |
@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
// This gist is part of the https://github.com/dartsidedev/gists repository. | |
// There, you'll find further information about this gist. | |
// https://github.com/dartsidedev/gists#5e2a8558d496fecd518b7846ba5995b7 | |
import 'package:flutter/material.dart'; | |
void main() => runApp(App()); | |
class App 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 'package:flutter/material.dart'; | |
final 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
void main() { | |
for (int i = 0; i < 5; i++) { | |
print('hello ${i + 1}'); | |
} | |
} |
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
rm -f ios/Podfile ios/Podfile.lock pubspec.lock && rm -rf ios/Runner.xcworkspace/xcshareddata/ && | |
flutter clean && | |
flutter pub cache repair && | |
rm -f ios/Podfile ios/Podfile.lock pubspec.lock && | |
flutter pub get && | |
flutter pub run build_runner clean |
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:math' as math; | |
import 'package:flutter/material.dart'; | |
final dscTeam = [ | |
{ | |
'name': 'Viviana Sutedjo', | |
'nickName': 'Vivi', | |
'color': getRandomColor(), | |
}, |
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(_SwitchingThemeApp()); | |
} | |
/// Properties that help me keep track of the example being run. | |
bool _useMaterial = false; | |
class _SwitchingThemeApp extends StatefulWidget { | |
@override | |
_SwitchingThemeAppState createState() => _SwitchingThemeAppState(); |
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
/** | |
* HOW TO USE IT | |
* Go the your event, then select attendee list. | |
* Make sure you are on the "Going" tab. | |
*/ | |
const $attendees = Array.from(document.querySelectorAll('h4.text--ellipsisOneLine')); | |
// Sorted names. | |
// Start with long names, then leave the names with no spaces to the end. |
NewerOlder