Skip to content

Commit

Permalink
Remove title
Browse files Browse the repository at this point in the history
  • Loading branch information
Carapacik committed Nov 29, 2023
1 parent 992d7c2 commit 64a45ae
Showing 1 changed file with 43 additions and 47 deletions.
90 changes: 43 additions & 47 deletions lib/src/feature/game/widget/game_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,57 +66,53 @@ class _GamePageState extends State<GamePage> {
context.read<GameBloc>().add(GameEvent.listenKeyEvent(event));
}
},
child: Title(
color: Colors.black,
title: context.r.appTitle,
child: Scaffold(
appBar: AppBar(
centerTitle: true,
title: BlocBuilder<GameBloc, GameState>(
builder: (context, state) => Text(
state.gameMode == GameMode.daily ? context.r.daily : context.r.levelNumber(state.lvlNumber ?? 1),
style: const TextStyle(fontWeight: FontWeight.w700, fontSize: 32),
),
child: Scaffold(
appBar: AppBar(
centerTitle: true,
title: BlocBuilder<GameBloc, GameState>(
builder: (context, state) => Text(
state.gameMode == GameMode.daily ? context.r.daily : context.r.levelNumber(state.lvlNumber ?? 1),
style: const TextStyle(fontWeight: FontWeight.w700, fontSize: 32),
),
actions: [
BlocBuilder<GameBloc, GameState>(
builder: (context, state) {
if (state.gameMode == GameMode.daily) {
return IconButton(
tooltip: context.r.viewStatistic,
icon: const Icon(Icons.leaderboard),
onPressed: () async {
await Navigator.of(context).push(
MaterialPageRoute<void>(
builder: (context) => StatisticPage(
dictionary: SettingsScope.dictionaryOf(context).dictionary,
),
),
actions: [
BlocBuilder<GameBloc, GameState>(
builder: (context, state) {
if (state.gameMode == GameMode.daily) {
return IconButton(
tooltip: context.r.viewStatistic,
icon: const Icon(Icons.leaderboard),
onPressed: () async {
await Navigator.of(context).push(
MaterialPageRoute<void>(
builder: (context) => StatisticPage(
dictionary: SettingsScope.dictionaryOf(context).dictionary,
),
);
},
);
} else {
return IconButton(
tooltip: context.r.viewLevels,
icon: const Icon(Icons.apps),
onPressed: () async {
await Navigator.of(context).push(
MaterialPageRoute<void>(
builder: (context) => LevelPage(
dictionary: SettingsScope.dictionaryOf(context).dictionary,
),
),
);
},
);
} else {
return IconButton(
tooltip: context.r.viewLevels,
icon: const Icon(Icons.apps),
onPressed: () async {
await Navigator.of(context).push(
MaterialPageRoute<void>(
builder: (context) => LevelPage(
dictionary: SettingsScope.dictionaryOf(context).dictionary,
),
);
},
);
}
},
),
],
),
drawer: const CustomDrawer(),
body: const GameBody(),
),
);
},
);
}
},
),
],
),
drawer: const CustomDrawer(),
body: const GameBody(),
),
);
}
Expand Down

0 comments on commit 64a45ae

Please sign in to comment.