View stream_beginner.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
import 'package:flutter/material.dart'; | |
import 'package:stream_chat_flutter/stream_chat_flutter.dart'; | |
void main() async { | |
WidgetsFlutterBinding.ensureInitialized(); | |
final client = StreamChatClient( | |
'YOUR_API_KEY', | |
logLevel: Level.INFO, | |
); |
View stream_laser.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
import 'dart:async'; | |
import 'dart:math'; | |
import 'dart:ui'; | |
import 'package:flutter/material.dart'; | |
import 'package:stream_chat_flutter/stream_chat_flutter.dart'; | |
import 'package:stream_chat_localizations/stream_chat_localizations.dart'; | |
import 'package:ezanimation/ezanimation.dart'; | |
void main() async { |
View stream_chess.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
import 'package:flutter/cupertino.dart'; | |
import 'package:flutter/foundation.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:stream_chat_flutter/stream_chat_flutter.dart'; | |
import 'package:stream_chat_localizations/stream_chat_localizations.dart'; | |
import 'package:flutter_chess_board/flutter_chess_board.dart'; | |
void main() async { | |
WidgetsFlutterBinding.ensureInitialized(); |
View transform_base.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
class MyHomePage extends StatefulWidget { | |
@override | |
_MyHomePageState createState() => _MyHomePageState(); | |
} | |
class _MyHomePageState extends State<MyHomePage> { | |
double x = 0; | |
double y = 0; | |
double z = 0; |
View curve_demo.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
colorAnimation = ColorTween(begin: Colors.blue, end: Colors.yellow).animate(CurvedAnimation(parent: controller, curve: Curves.bounceOut)); |
View controller_code.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
// In initState | |
controller.addListener(() { | |
setState(() {}); | |
}); |
View container_code.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
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
appBar: AppBar( | |
title: Text("Animation Demo"), | |
), | |
body: Center( | |
child: Container( | |
height: sizeAnimation.value, | |
width: sizeAnimation.value, |
View animation_setup.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
AnimationController controller; | |
Animation colorAnimation; | |
Animation sizeAnimation; | |
@override | |
void initState() { | |
super.initState(); | |
controller = AnimationController(vsync: this, duration: Duration(seconds: 2)); | |
colorAnimation = ColorTween(begin: Colors.blue, end: Colors.yellow).animate(controller); | |
sizeAnimation = Tween<double>(begin: 100.0, end: 200.0).animate(controller); |
View base_page.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
import 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
// This widget is the root of your application. | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( |
View base_code.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
import 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
// This widget is the root of your application. | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
title: 'Flutter Demo', |
NewerOlder