-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
58ccdd8
commit b72b7aa
Showing
4 changed files
with
143 additions
and
70 deletions.
There are no files selected for viewing
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
36 changes: 36 additions & 0 deletions
36
example/lib/shared/modules/trivia/finished/trivia_finished_status_view.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import 'package:core/core.dart'; | ||
import 'package:flutter/material.dart'; | ||
|
||
import '../../../components/labeled_section.dart'; | ||
|
||
class TriviaFinishedStatusView extends StatelessWidget { | ||
const TriviaFinishedStatusView({ | ||
Key? key, | ||
required this.triviaId, | ||
required this.onSeeScoreboardTap, | ||
}) : super(key: key); | ||
|
||
final String triviaId; | ||
final Function(String) onSeeScoreboardTap; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return LabeledSection( | ||
label: 'Finished', | ||
child: Column( | ||
mainAxisSize: MainAxisSize.min, | ||
children: [ | ||
MainActionWidget( | ||
action: MainAction( | ||
label: 'See scoreboard', | ||
onPressed: () { | ||
debugPrint('$runtimeType onSeeScoreboardTap'); | ||
onSeeScoreboardTap(triviaId); | ||
}, | ||
), | ||
), | ||
], | ||
), | ||
); | ||
} | ||
} |
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
46 changes: 46 additions & 0 deletions
46
example/lib/shared/modules/trivia/started/trivia_started_view.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import 'package:core/core.dart'; | ||
import 'package:example/shared/components/labeled_section.dart'; | ||
import 'package:flutter/material.dart'; | ||
|
||
class TriviaStartedStatusView extends StatelessWidget { | ||
const TriviaStartedStatusView({ | ||
Key? key, | ||
required this.triviaId, | ||
required this.onStartPlayTap, | ||
required this.onSeeScoreboardTap, | ||
}) : super(key: key); | ||
|
||
final String triviaId; | ||
final Function(String) onStartPlayTap; | ||
final Function(String) onSeeScoreboardTap; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return LabeledSection( | ||
label: 'Started', | ||
child: Column( | ||
mainAxisSize: MainAxisSize.min, | ||
children: [ | ||
MainActionWidget( | ||
action: MainAction( | ||
label: 'Start play!', | ||
onPressed: () { | ||
debugPrint('$runtimeType onStartPlayTap'); | ||
onStartPlayTap(triviaId); | ||
}, | ||
), | ||
), | ||
MainActionWidget( | ||
action: MainAction( | ||
label: 'See scoreboard', | ||
onPressed: () { | ||
debugPrint('$runtimeType onSeeScoreboardTap'); | ||
onSeeScoreboardTap(triviaId); | ||
}, | ||
), | ||
), | ||
], | ||
), | ||
); | ||
} | ||
} |