Skip to content

Commit

Permalink
feat: Add CompetitionsView
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustl22 committed Jan 17, 2024
1 parent edfaa00 commit e39198d
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 1 deletion.
1 change: 1 addition & 0 deletions wrestling_scoreboard_client/lib/l10n/app_de.arb
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
"participatingTeams": "Teilnehmende Mannschaften",
"league": "Liga",
"leagues": "Ligen",
"competitions": "Turniere",
"match": "Begegnung",
"matches": "Begegnungen",
"matchNumber": "Begegnungs-ID / Kampf-ID",
Expand Down
1 change: 1 addition & 0 deletions wrestling_scoreboard_client/lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
"participatingTeams": "Participating Teams",
"league": "League",
"leagues": "Leagues",
"competitions": "Competitions",
"match": "Match",
"matches": "Matches",
"matchNumber": "Match-ID",
Expand Down
10 changes: 10 additions & 0 deletions wrestling_scoreboard_client/lib/ui/home/competitions_view.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import 'package:flutter/material.dart';

class CompetitionsView extends StatelessWidget {
const CompetitionsView({super.key});

@override
Widget build(BuildContext context) {
return const Center(child: Text('Not yet implemented'));
}
}
15 changes: 14 additions & 1 deletion wrestling_scoreboard_client/lib/ui/home/home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:wrestling_scoreboard_client/provider/network_provider.dart';
import 'package:wrestling_scoreboard_client/ui/home/clubs_view.dart';
import 'package:wrestling_scoreboard_client/ui/home/competitions_view.dart';
import 'package:wrestling_scoreboard_client/ui/home/leagues_view.dart';
import 'package:wrestling_scoreboard_client/util/network/remote/web_socket.dart';

Expand Down Expand Up @@ -65,7 +66,7 @@ class HomeState extends ConsumerState<Home> {
Widget build(BuildContext context) {
final localizations = AppLocalizations.of(context)!;
return DefaultTabController(
length: 2,
length: 3,
child: Scaffold(
appBar: AppBar(
title: Text(localizations.home),
Expand All @@ -91,13 +92,25 @@ class HomeState extends ConsumerState<Home> {
],
),
),
Tab(
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
// const Icon(Icons.social_leaderboard),
const Icon(Icons.leaderboard),
const SizedBox(width: 8),
Text(localizations.competitions),
],
),
),
],
),
),
body: const TabBarView(
children: [
LeaguesView(),
ClubsView(),
CompetitionsView(),
],
),
),
Expand Down

0 comments on commit e39198d

Please sign in to comment.