π
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 Json extends Iterable<Json> { | |
Json(this.value); | |
Json.from(String s) : this(jsonDecode(s)); | |
final dynamic value; | |
@override | |
String toString() => jsonEncode(value); |
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:math' as math; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/rendering.dart'; | |
import 'package:flutter/gestures.dart'; | |
const double kTwoPi = 2 * math.pi; | |
class SectorConstraints extends Constraints { | |
const SectorConstraints({ |
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 'package:flutter/rendering.dart'; | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { |
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
.PHONY: help l10n-extract-to-arb l10n-generate-from-arb | |
help: | |
@ echo 'Available commands:' | |
@ echo | |
@ echo ' l10n-extract-to-arb : Extract app_localizations.dart into intl_messages.arb' | |
@ echo ' Duplicate content of intl_messages.arb into intl_xx.arb' | |
@ echo ' l10n-generate-from-arb : Generate messages_*.dart files from intl_*.arb' | |
@ echo | |
@ echo |
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
TypeScript 21 hrs 47 mins ββββββββββββββββββββ 67.1% | |
Vue.js 6 hrs 21 mins ββββββββββββββββββββ 19.6% | |
JSON 2 hrs 10 mins ββββββββββββββββββββ 6.7% | |
JavaScript 46 mins ββββββββββββββββββββ 2.4% |
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'; | |
class FadeIndexedStack extends StatefulWidget { | |
final int index; | |
final List<Widget> children; | |
final Duration duration; | |
const FadeIndexedStack({ | |
Key key, | |
this.index, |
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/gestures.dart'; | |
import 'package:flutter/rendering.dart'; | |
import 'package:flutter/widgets.dart' hide PageView; | |
/// This is copy-pasted from the Flutter framework with a support added for building | |
/// pages off screen using [Viewport.cacheExtents] and a [LayoutBuilder] | |
/// | |
/// Based on commit 3932ffb1cd5dfa0c3891c60977ee4f9cd70ade66 on channel dev | |
// Having this global (mutable) page controller is a bit of a hack. We need it |
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 'package:flutter/widgets.dart'; | |
void main() { | |
runApp( | |
MaterialApp( | |
theme: ThemeData( | |
primaryColor: Colors.indigo, | |
accentColor: Colors.pinkAccent, | |
), |
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 android.graphics.Color; | |
import android.os.Build; | |
import android.os.Bundle; | |
import android.view.View; | |
import android.view.Window; | |
import io.flutter.app.FlutterActivity; | |
import io.flutter.plugins.GeneratedPluginRegistrant; | |
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:convert'; | |
import 'package:my_app/data_model/serializers.dart'; | |
import 'package:flutter/foundation.dart'; | |
Future<T> decodeJson<T>(String res) async { | |
var list = List(); | |
list.add(res); | |
list.add(T); | |
//Replace compute with spawning any other isolate, compute is simpler abstraction of isolate api. |