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
Widget build(BuildContext context) { | |
return Navigator( | |
onGenerateRoute: (RouteSettings settings) { | |
return new MaterialPageRoute( | |
settings: settings, | |
builder: (BuildContext context) { | |
return Scaffold( | |
//List {Математика, Английский язык...} | |
); | |
}); |
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 MainTabOrDetailPage extends StatefulWidget { | |
final BuildContext rootContext; | |
StudentMainTab({@required this.rootContext}); | |
@override | |
State<StatefulWidget> createState() { | |
return _MainTabOrDetailPage(); | |
} | |
} | |
class _MainTabOrDetailPage extends State<MainTabOrDetailPage> { |
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 RootPage extends StatefulWidget { | |
@override | |
State<StatefulWidget> createState() { | |
return _RootPage(); | |
} | |
} | |
class _RootPage extends State<RootPage> { | |
int _currentIndex = 0; |
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'; | |
class CardItem extends StatefulWidget { | |
CardItem({Key key, this.color, this.value}) : super(key: key); | |
final int value; | |
final Color color; | |
_CardItemState createState() => _CardItemState(); | |
} |
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:flutter/animation.dart'; | |
import 'package:animation_playground/classes/card.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
// PlayerListener used to listen player via websocket | |
func PlayerListener(pc *model.PlayerConn) { | |
defer func(pc *model.PlayerConn) { | |
if r := recover(); r != nil { | |
log.Println("Recovered in PlayerListener", r) | |
} | |
if !pc.WR { | |
log.Printf("closing in listener %d", pc.PlayerID) |