Skip to content

Commit

Permalink
Merge branch 'develop' into develop-lmp-fix-dsm-scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
julien-deramond authored Apr 3, 2024
2 parents 80f92c1 + 3343710 commit 6d831eb
Show file tree
Hide file tree
Showing 101 changed files with 1,312 additions and 1,682 deletions.
3 changes: 3 additions & 0 deletions .fvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"flutter": "3.10.0"
}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@
*.iml
*.ipr
*.iws
.dart_tool/
.fvm/
.idea/
.vscode/
app/ios/Podfile.lock
75 changes: 0 additions & 75 deletions app/lib/firebase_options.dart

This file was deleted.

2 changes: 1 addition & 1 deletion app/lib/ui/about/about_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class AboutScreen extends StatefulWidget {
const AboutScreen({Key? key}) : super(key: key);

@override
_AboutScreenState createState() => _AboutScreenState();
State<AboutScreen> createState() => _AboutScreenState();
}

class _AboutScreenState extends State<AboutScreen> {
Expand Down
13 changes: 9 additions & 4 deletions app/lib/ui/about/detail/about_file_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import 'dart:convert';
import 'dart:io';

import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:markdown/markdown.dart' as md;
Expand Down Expand Up @@ -317,10 +318,14 @@ String convertToHtml(
var result = "<html>";
result += head;

if (Platform.isIOS) {
result += cssApple;
} else if (Platform.isAndroid) {
result += cssAndroid;
if (!kIsWeb) {
if (Platform.isIOS) {
result += cssApple;
} else {
if (Platform.isAndroid) {
result += cssAndroid;
}
}
}

result += "</head>";
Expand Down
15 changes: 2 additions & 13 deletions app/lib/ui/components/app_bars/top/top_app_bar_large.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,10 @@ import 'package:ods_flutter_demo/ui/components/app_bars/top/top_app_bars_customi
import 'package:ods_flutter_demo/ui/theme/theme_selector.dart';
import 'package:ods_flutter_demo/ui/utilities/component_count_row.dart';

class ComponentTopAppBarLarge extends StatefulWidget {
const ComponentTopAppBarLarge({super.key});
@override
State<ComponentTopAppBarLarge> createState() =>
_ComponentTopAppBarLargeState();
}

class _ComponentTopAppBarLargeState extends State<ComponentTopAppBarLarge> {
class ComponentTopAppBarLarge extends StatelessWidget {
ComponentTopAppBarLarge({super.key});
final _scaffoldKey = GlobalKey<ScaffoldState>();

@override
void initState() {
super.initState();
}

@override
Widget build(BuildContext context) {
return ComponentTopAppBarsCustomization(
Expand Down
14 changes: 2 additions & 12 deletions app/lib/ui/components/app_bars/top/top_app_bars.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,10 @@ import 'package:ods_flutter_demo/ui/components/app_bars/top/top_app_bars_customi
import 'package:ods_flutter_demo/ui/theme/theme_selector.dart';
import 'package:ods_flutter_demo/ui/utilities/component_count_row.dart';

class ComponentTopAppBars extends StatefulWidget {
const ComponentTopAppBars({super.key});
@override
State<ComponentTopAppBars> createState() => _ComponentTopAppBarsState();
}

class _ComponentTopAppBarsState extends State<ComponentTopAppBars> {
class ComponentTopAppBars extends StatelessWidget {
ComponentTopAppBars({super.key});
final _scaffoldKey = GlobalKey<ScaffoldState>();

@override
void initState() {
super.initState();
}

@override
Widget build(BuildContext context) {
return ComponentTopAppBarsCustomization(
Expand Down
45 changes: 17 additions & 28 deletions app/lib/ui/components/buttons/button_contained.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,42 +28,36 @@ enum ButtonEmphasis {
functional,
}

class ButtonsContained extends StatefulWidget {
final ButtonEmphasis emphasis;

ButtonsContained({Key? key, required this.emphasis}) : super(key: key);
class ButtonsContained extends StatelessWidget {
const ButtonsContained({Key? key, required this.emphasis}) : super(key: key);

@override
_ButtonsContainedState createState() => _ButtonsContainedState();
}

class _ButtonsContainedState extends State<ButtonsContained> {
_ButtonsContainedState();
final ButtonEmphasis emphasis;

@override
Widget build(BuildContext context) {
String getAppBarTitle() {
switch (emphasis) {
case ButtonEmphasis.highEmphasis:
return AppLocalizations.of(context)!.buttonsHighEmphasisVariantTitle;
case ButtonEmphasis.mediumEmphasis:
return AppLocalizations.of(context)!
.buttonsMediumEmphasisVariantTitle;
case ButtonEmphasis.functional:
return AppLocalizations.of(context)!.buttonsFunctionalVariantTitle;
}
}

return ButtonCustomization(
child: Scaffold(
bottomSheet: OdsSheetsBottom(
sheetContent: _CustomizationContent(emphasis: widget.emphasis),
sheetContent: _CustomizationContent(emphasis: emphasis),
title: AppLocalizations.of(context)!.componentCustomizeTitle,
),
appBar: MainAppBar(getAppBarTitle()),
body: SafeArea(child: _Body(emphasis: widget.emphasis)),
body: SafeArea(child: _Body(emphasis: emphasis)),
),
);
}

String getAppBarTitle() {
switch (widget.emphasis) {
case ButtonEmphasis.highEmphasis:
return AppLocalizations.of(context)!.buttonsHighEmphasisVariantTitle;
case ButtonEmphasis.mediumEmphasis:
return AppLocalizations.of(context)!.buttonsMediumEmphasisVariantTitle;
case ButtonEmphasis.functional:
return AppLocalizations.of(context)!.buttonsFunctionalVariantTitle;
}
}
}

class _Body extends StatelessWidget {
Expand Down Expand Up @@ -118,11 +112,6 @@ class _CustomizationContent extends StatefulWidget {
class _CustomizationContentState extends State<_CustomizationContent> {
_CustomizationContentState();

@override
void initState() {
super.initState();
}

@override
Widget build(BuildContext context) {
final ButtonCustomizationState? customizationState =
Expand Down
14 changes: 2 additions & 12 deletions app/lib/ui/components/buttons/button_outlined.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,11 @@ import 'package:ods_flutter/guidelines/spacings.dart';
import 'package:ods_flutter_demo/ui/components/buttons/button_customization.dart';
import 'package:ods_flutter_demo/ui/main_app_bar.dart';

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

@override
State<ButtonsOutlined> createState() => _ButtonsOutlinedState();
}

class _ButtonsOutlinedState extends State<ButtonsOutlined> {
final _scaffoldKey = GlobalKey<ScaffoldState>();

@override
void initState() {
super.initState();
}

@override
Widget build(BuildContext context) {
return ButtonCustomization(
Expand Down
19 changes: 2 additions & 17 deletions app/lib/ui/components/buttons/button_text.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,11 @@ import 'package:ods_flutter_demo/ui/components/buttons/button_customization.dart
import 'package:ods_flutter_demo/ui/components/buttons/button_enum.dart';
import 'package:ods_flutter_demo/ui/main_app_bar.dart';

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

@override
State<ButtonsText> createState() => _ButtonsTextState();
}

class _ButtonsTextState extends State<ButtonsText> {
final _scaffoldKey = GlobalKey<ScaffoldState>();

@override
void initState() {
super.initState();
}

@override
Widget build(BuildContext context) {
return ButtonCustomization(
Expand Down Expand Up @@ -95,11 +85,6 @@ class _CustomizationContent extends StatefulWidget {
class _CustomizationContentState extends State<_CustomizationContent> {
_CustomizationContentState();

@override
void initState() {
super.initState();
}

@override
Widget build(BuildContext context) {
final ButtonCustomizationState? customizationState =
Expand Down
29 changes: 8 additions & 21 deletions app/lib/ui/components/buttons/buttons_icon/button_icon.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,11 @@ import 'package:ods_flutter_demo/ui/components/buttons/buttons_icon/button_icon_
import 'package:ods_flutter_demo/ui/components/buttons/buttons_icon/button_icon_enum.dart';
import 'package:ods_flutter_demo/ui/main_app_bar.dart';

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

@override
State<ButtonsIcons> createState() => _ButtonsIconsState();
}

class _ButtonsIconsState extends State<ButtonsIcons> {
final _scaffoldKey = GlobalKey<ScaffoldState>();

@override
void initState() {
super.initState();
}

@override
Widget build(BuildContext context) {
return ButtonIconCustomization(
Expand Down Expand Up @@ -73,10 +63,12 @@ class _BodyState extends State<_Body> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
selected
? AppLocalizations.of(context)!.buttonsIconSelected
: AppLocalizations.of(context)!.buttonsIconDeselected,
ExcludeSemantics(
child: Text(
selected
? AppLocalizations.of(context)!.buttonsIconSelected
: AppLocalizations.of(context)!.buttonsIconDeselected,
),
),
OdsButtonIcon(
icon: Image.asset('assets/ic_heart_deselected.png'),
Expand Down Expand Up @@ -124,11 +116,6 @@ class _CustomizationContent extends StatefulWidget {
class _CustomizationContentState extends State<_CustomizationContent> {
_CustomizationContentState();

@override
void initState() {
super.initState();
}

@override
Widget build(BuildContext context) {
final ButtonIconCustomizationState? customizationState =
Expand Down
14 changes: 2 additions & 12 deletions app/lib/ui/components/buttons/segmented/segmented_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,11 @@ import 'package:ods_flutter_demo/ui/utilities/component_count_row.dart';

enum Foods { ham, milk, figs, eggs, oil }

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

@override
State<SegmentedButtons> createState() => _SegmentedButtonsState();
}

class _SegmentedButtonsState extends State<SegmentedButtons> {
final _scaffoldKey = GlobalKey<ScaffoldState>();

@override
void initState() {
super.initState();
}

@override
Widget build(BuildContext context) {
return SegmentedButtonCustomization(
Expand Down
Loading

0 comments on commit 6d831eb

Please sign in to comment.