Skip to content

Instantly share code, notes, and snippets.

🐶
( ´・‿・`)

Masayuki Ono mono0926

View GitHub Profile
View hud.dart
import 'package:flutter/material.dart';
class HUD {
BuildContext hudContext;
void show(BuildContext context) {
showGeneralDialog(
context: context,
pageBuilder: (hudContext, _a, _sa) {
this.hudContext = hudContext;
return const Center(child: CircularProgressIndicator());
View itemized_text.dart
import 'package:flutter/material.dart';
import 'widgets.dart';
class ItemizedText extends StatelessWidget {
const ItemizedText(
this.texts, {
Key key,
}) : super(key: key);
View text_scale_factor.dart
import 'dart:math' as math;
import 'package:flutter/widgets.dart';
class TextScaleFactor extends StatelessWidget {
const TextScaleFactor({
Key key,
@required this.child,
this.min = 1,
this.max,
@mono0926
mono0926 / main.dart
Created Mar 29, 2019
Flutter Widget Quiz
View main.dart
import 'dart:convert';
import 'package:flare_flutter/flare_actor.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:url_launcher/url_launcher.dart';
main() => runApp(A());
const sz = SizedBox(height: 8);
View custom_paint.dart
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
theme: ThemeData(primarySwatch: Colors.red),
View transitionBuilder.dart
transitionBuilder: (child, animation) {
return FadeTransition(
opacity: animation.drive(CurveTween(curve: Interval(0.5, 1))),
child: child,
);
}
View animation.dart
import 'package:animations/widget/app_scaffold.dart';
import 'package:flutter/material.dart';
class AnimatedSwitcher2Page extends StatefulWidget {
static const routeName = 'AnimatedSwitcher2Page';
@override
_AnimatedSwitcher2PageState createState() => _AnimatedSwitcher2PageState();
}
View forEachTween.dart
@override
void forEachTween(visitor) {
_colorTween = visitor(
_colorTween,
widget.targetColor,
(color) => GhostFadeTween(begin: color as Color),
) as GhostFadeTween;
// ...
}
View animation.dart
import 'package:animations/pages/custom/widget/ghost_fade_tween.dart';
import 'package:animations/pages/custom/widget/switch_string_tween.dart';
import 'package:animations/widget/app_scaffold.dart';
import 'package:flutter/material.dart';
class ImplicitlyAnimatedWidgetPage extends StatefulWidget {
static const routeName = 'ImplicitlyAnimatedWidgetPage';
@override
_ImplicitlyAnimatedWidgetPageState createState() =>
View animation.dart
import 'package:animations/pages/custom/widget/ghost_fade_tween.dart';
import 'package:animations/pages/custom/widget/switch_string_tween.dart';
import 'package:animations/widget/app_scaffold.dart';
import 'package:flutter/material.dart';
class AnimatedBuilderPage extends StatefulWidget {
static const routeName = 'AnimatedBuilderPage';
@override
_AnimatedBuilderPageState createState() => _AnimatedBuilderPageState();
You can’t perform that action at this time.