Skip to content

Commit

Permalink
fix: dart issues
Browse files Browse the repository at this point in the history
  • Loading branch information
dlamande committed May 21, 2024
1 parent 787bb69 commit 62cc075
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 10 deletions.
2 changes: 1 addition & 1 deletion android/app/src/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<application android:label="Agir ! (Staging)">
<application>

</application>
</manifest>
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'package:agir/agir_state.dart';
import 'package:agir/authentification/adapters/authentification_http_repository.dart';
import 'package:agir/authentification/authenticateUser_usecase.dart';
import 'package:agir/authentification/ports/authentification_repository.dart';
import 'package:redux/redux.dart';
Expand Down
1 change: 0 additions & 1 deletion lib/interactions/redux/interactions_middleware.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'package:agir/agir_state.dart';
import 'package:agir/interactions/adapters/interactions_http_repository.dart';
import 'package:agir/interactions/fetchInteractions_usecase.dart';
import 'package:agir/interactions/ports/interactions_repository.dart';
import 'package:redux/redux.dart';
Expand Down
3 changes: 2 additions & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,10 @@ class MyApp extends StatelessWidget {
case 'home':
return MaterialPageRoute(
fullscreenDialog: false,
builder: (_) => HomePage(),
builder: (_) => const HomePage(),
settings: settings);
}
return null;
},

//home: LoginPage(),
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/agir_bottom_bar_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class AgirBottomNavigationBar extends StatefulWidget {
class _AgirBottomNavigationBarState extends State<AgirBottomNavigationBar> {
@override
Widget build(BuildContext context) {
return Container(
return SizedBox(
height: 52,
child: Row(mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [
buildNavigationBarItem("assets/ic-home.svg", 0, "Agir !"),
Expand Down
3 changes: 2 additions & 1 deletion lib/ui/authentification_widget.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'package:agir/authentification/redux/authentification_actions.dart';
import 'package:agir/ui/landing_widget.dart';
import 'package:equatable/equatable.dart';
import 'package:flutter/material.dart';
import 'package:flutter_redux/flutter_redux.dart';
Expand Down Expand Up @@ -28,6 +27,8 @@ class LoginViewModel extends Equatable {
class LoginPage extends StatelessWidget {
final TextEditingController _usernameController = TextEditingController();

LoginPage({super.key});

@override
Widget build(BuildContext context) {
return StoreConnector<AgirState, LoginViewModel>(
Expand Down
8 changes: 5 additions & 3 deletions lib/ui/coach_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,18 @@ import 'coach_user_widget.dart';
import 'interactions_widget.dart';

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

@override
Widget build(BuildContext context) {
return Scaffold(
return const Scaffold(
body: SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 16, horizontal: 16),
padding: EdgeInsets.symmetric(vertical: 16, horizontal: 16),
child: Column(
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [CoachUserWidget(), const SizedBox(height: 24), InteractionsWidget()],
children: [CoachUserWidget(), SizedBox(height: 24), InteractionsWidget()],
),
),
),
Expand Down
2 changes: 2 additions & 0 deletions lib/ui/coach_user_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ class CoachUserViewModel {
}

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

@override
Widget build(BuildContext context) {
return StoreConnector<AgirState, CoachUserViewModel>(
Expand Down
2 changes: 2 additions & 0 deletions lib/ui/home_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';

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

@override
Widget build(BuildContext context) {
return Scaffold(
Expand Down
2 changes: 2 additions & 0 deletions lib/ui/interactions_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ class InteractionsViewModel extends Equatable {
}

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

@override
Widget build(BuildContext context) {
return StoreConnector<AgirState, InteractionsViewModel>(
Expand Down
4 changes: 3 additions & 1 deletion lib/ui/landing_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import 'package:flutter_svg/flutter_svg.dart';
class LandingPage extends StatefulWidget {
int currentNavigationBarIndex = 0;

LandingPage({super.key});

@override
State<LandingPage> createState() => _LandingPageState();
}
Expand Down Expand Up @@ -62,7 +64,7 @@ class _LandingPageState extends State<LandingPage> {

Widget displayCurrentScreen() {
if (widget.currentNavigationBarIndex == 0) {
return CoachScreen();
return const CoachScreen();
} else {
return const SizedBox();
}
Expand Down

0 comments on commit 62cc075

Please sign in to comment.