Skip to content

Commit

Permalink
fix: adding missing imports
Browse files Browse the repository at this point in the history
  • Loading branch information
maximeroucher committed Feb 18, 2024
1 parent f8c3806 commit 31424b8
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 19 deletions.
3 changes: 1 addition & 2 deletions lib/elocaps/ui/button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ class MyButton extends StatelessWidget {
final EdgeInsets? margin;

const MyButton(
{Key? key, required this.text, this.enabled = true, this.margin})
: super(key: key);
{super.key, required this.text, this.enabled = true, this.margin});

@override
Widget build(BuildContext context) {
Expand Down
4 changes: 2 additions & 2 deletions lib/elocaps/ui/dialog_waiting_game.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ void maybeShowDialog(context) {

class WaitingDialog extends HookConsumerWidget {
const WaitingDialog({
Key? key,
}) : super(key: key);
super.key,
});

@override
Widget build(BuildContext context, WidgetRef ref) {
Expand Down
2 changes: 1 addition & 1 deletion lib/elocaps/ui/elocaps.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import 'package:qlevar_router/qlevar_router.dart';

class ElocapsTemplate extends HookConsumerWidget {
final Widget child;
const ElocapsTemplate({Key? key, required this.child}) : super(key: key);
const ElocapsTemplate({super.key, required this.child});

@override
Widget build(BuildContext context, WidgetRef ref) {
Expand Down
2 changes: 1 addition & 1 deletion lib/elocaps/ui/pages/game_page/game_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import 'package:myecl/user/providers/user_provider.dart';
import 'package:qlevar_router/qlevar_router.dart';

class GamePage extends HookConsumerWidget {
const GamePage({Key? key}) : super(key: key);
const GamePage({super.key});

@override
Widget build(BuildContext context, WidgetRef ref) {
Expand Down
4 changes: 2 additions & 2 deletions lib/elocaps/ui/pages/game_page/mode_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import 'package:myecl/elocaps/tools/constants.dart';

class ModeDialog extends HookConsumerWidget {
const ModeDialog({
Key? key,
super.key,
required this.players,
}) : super(key: key);
});

final List<PlayerForm> players;

Expand Down
5 changes: 2 additions & 3 deletions lib/elocaps/ui/pages/game_page/player_form.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@ import 'package:myecl/elocaps/tools/constants.dart';

class PlayerForm extends HookConsumerWidget {
const PlayerForm(
{Key? key,
{super.key,
required this.index,
required this.isFocused,
required this.queryController,
required this.user})
: super(key: key);
required this.user});

final int index;
final ValueNotifier<List<bool>> isFocused;
Expand Down
4 changes: 2 additions & 2 deletions lib/elocaps/ui/pages/history_page/game_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:myecl/elocaps/class/game.dart';
import 'package:myecl/elocaps/providers/game_provider.dart';
import 'package:myecl/elocaps/providers/player_histo_provider.dart';
import 'package:myecl/elocaps/tools/constants.dart';
import 'package:myecl/tools/functions.dart';
import 'package:myecl/user/providers/user_provider.dart';
import 'package:myecl/tools/constants.dart';

class GameCard extends HookConsumerWidget {
const GameCard({Key? key, required this.game}) : super(key: key);
const GameCard({super.key, required this.game});

final Game game;

Expand Down
3 changes: 2 additions & 1 deletion lib/elocaps/ui/pages/history_page/history_page.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:myecl/elocaps/providers/player_histo_provider.dart';
import 'package:myecl/elocaps/tools/constants.dart';
import 'package:myecl/elocaps/ui/elocaps.dart';
import 'package:myecl/elocaps/ui/pages/history_page/game_card.dart';
import 'package:myecl/tools/ui/builders/async_child.dart';
Expand All @@ -9,7 +10,7 @@ import 'package:myecl/tools/ui/widgets/align_left_text.dart';
import 'package:myecl/user/providers/user_provider.dart';

class HistoryPage extends HookConsumerWidget {
const HistoryPage({Key? key}) : super(key: key);
const HistoryPage({super.key});

@override
Widget build(BuildContext context, WidgetRef ref) {
Expand Down
4 changes: 2 additions & 2 deletions lib/elocaps/ui/pages/main_page/main_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import 'package:myecl/elocaps/providers/leader_board_player_map_notifier.dart';
import 'package:myecl/elocaps/providers/mode_chosen_provider.dart';
import 'package:myecl/elocaps/providers/player_list_provider.dart';
import 'package:myecl/elocaps/router.dart';
import 'package:myecl/elocaps/tools/constants.dart';
import 'package:myecl/elocaps/ui/button.dart';
import 'package:myecl/elocaps/ui/elocaps.dart';
import 'package:myecl/elocaps/ui/pages/main_page/leader_board.dart';
Expand All @@ -14,10 +15,9 @@ import 'package:myecl/tools/ui/layouts/horizontal_list_view.dart';
import 'package:myecl/tools/ui/layouts/item_chip.dart';
import 'package:myecl/tools/ui/widgets/align_left_text.dart';
import 'package:qlevar_router/qlevar_router.dart';
import 'package:myecl/tools/constants.dart';

class EloCapsMainPage extends HookConsumerWidget {
const EloCapsMainPage({Key? key}) : super(key: key);
const EloCapsMainPage({super.key});

@override
Widget build(BuildContext context, WidgetRef ref) {
Expand Down
6 changes: 4 additions & 2 deletions lib/elocaps/ui/pages/main_page/podium_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ import 'package:myecl/elocaps/tools/constants.dart';

class PodiumCard extends StatelessWidget {
const PodiumCard(
{Key? key, required this.player, required this.index, required this.isMe})
: super(key: key);
{super.key,
required this.player,
required this.index,
required this.isMe});

final Player player;
final int index;
Expand Down
2 changes: 1 addition & 1 deletion lib/tools/providers/single_notifier.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:myecl/tools/exception.dart';

abstract class SingleNotifier<T> extends StateNotifier<AsyncValue<T>> {
SingleNotifier(AsyncValue<T> state) : super(state);
SingleNotifier(super.state);

Future<AsyncValue<T>> load(Future<T> Function() f) async {
try {
Expand Down

0 comments on commit 31424b8

Please sign in to comment.