Skip to content

Commit

Permalink
Update project to Flutter 3.10.6 and Dart 3.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
TJMusiitwa committed Aug 23, 2023
1 parent 6d60f84 commit cbbfbce
Show file tree
Hide file tree
Showing 65 changed files with 2,306 additions and 472 deletions.
39 changes: 37 additions & 2 deletions .metadata
Original file line number Diff line number Diff line change
@@ -1,10 +1,45 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled and should not be manually edited.
# This file should be version controlled.

version:
revision: 84f3d28555368a70270e9ac8390a9441df95e752
revision: f468f3366c26a5092eb964a230ce7892fda8f2f8
channel: stable

project_type: app

# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8
base_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8
- platform: android
create_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8
base_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8
- platform: ios
create_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8
base_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8
- platform: linux
create_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8
base_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8
- platform: macos
create_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8
base_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8
- platform: web
create_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8
base_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8
- platform: windows
create_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8
base_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8

# User provided section

# List of Local paths (relative to this file) that should be
# ignored by the migrate tool.
#
# Files that are not part of the templates will be ignored by default.
unmanaged_files:
- 'lib/main.dart'
- 'ios/Runner.xcodeproj/project.pbxproj'
19 changes: 19 additions & 0 deletions android/app/src/main/res/values-night-v31/styles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
<item name="android:forceDarkAllowed">false</item>
<item name="android:windowFullscreen">false</item>
<item name="android:windowDrawsSystemBarBackgrounds">false</item>
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
Flutter UI initializes, as well as behind your Flutter UI while its
running.
This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item>
</style>
</resources>
4 changes: 4 additions & 0 deletions android/app/src/main/res/values-night/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
<!-- Show a splash screen on the activity. Automatically removed when
Flutter draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
<item name="android:forceDarkAllowed">false</item>
<item name="android:windowFullscreen">false</item>
<item name="android:windowDrawsSystemBarBackgrounds">false</item>
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
Expand Down
19 changes: 19 additions & 0 deletions android/app/src/main/res/values-v31/styles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
<item name="android:forceDarkAllowed">false</item>
<item name="android:windowFullscreen">false</item>
<item name="android:windowDrawsSystemBarBackgrounds">false</item>
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
Flutter UI initializes, as well as behind your Flutter UI while its
running.
This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item>
</style>
</resources>
8 changes: 4 additions & 4 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@ PODS:
DEPENDENCIES:
- Flutter (from `Flutter`)
- flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)

EXTERNAL SOURCES:
Flutter:
:path: Flutter
flutter_native_splash:
:path: ".symlinks/plugins/flutter_native_splash/ios"
path_provider_foundation:
:path: ".symlinks/plugins/path_provider_foundation/ios"
:path: ".symlinks/plugins/path_provider_foundation/darwin"

SPEC CHECKSUMS:
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
flutter_native_splash: 52501b97d1c0a5f898d687f1646226c1f93c56ef
path_provider_foundation: c68054786f1b4f3343858c1e1d0caaded73f0be9
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943

PODFILE CHECKSUM: ef19549a9bc3046e7bb7d2fab4d021637c0c58a3

COCOAPODS: 1.11.3
COCOAPODS: 1.12.0
1 change: 1 addition & 0 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@
files = (
);
inputPaths = (
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
);
name = "Thin Binary";
outputPaths = (
Expand Down
8 changes: 4 additions & 4 deletions ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
<key>UIStatusBarHidden</key>
<false/>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
</dict>
<true/>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
</dict>
</plist>
12 changes: 12 additions & 0 deletions ios/RunnerTests/RunnerTests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import Flutter
import UIKit
import XCTest

class RunnerTests: XCTestCase {

func testExample() {
// If you add code to the Runner application, consider adding tests here.
// See https://developer.apple.com/documentation/xctest for more information about using XCTest.
}

}
20 changes: 9 additions & 11 deletions lib/macos_main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,31 +25,29 @@ class _MacOSMainState extends State<MacOSMain> {
scrollController: controller,
items: const [
SidebarItem(
leading: Icon(CupertinoIcons.list_bullet),
leading: MacosIcon(CupertinoIcons.list_bullet),
label: Text('Menu'),
),
SidebarItem(
leading: Icon(CupertinoIcons.heart),
leading: MacosIcon(CupertinoIcons.heart),
label: Text('Favorites'),
),
SidebarItem(
leading: Icon(CupertinoIcons.book_fill),
leading: MacosIcon(CupertinoIcons.book_fill),
label: Text('Recipes'),
),
SidebarItem(
leading: Icon(CupertinoIcons.checkmark_seal),
leading: MacosIcon(CupertinoIcons.checkmark_seal),
label: Text('Rewards'),
),
]),
minWidth: 200,
isResizable: false,
bottom: const Padding(
padding: EdgeInsets.all(16.0),
child: MacosListTile(
leading: MacosIcon(CupertinoIcons.profile_circled),
title: Text('Fruta User'),
subtitle: Text('user@fruta.com'),
)),
bottom: const MacosListTile(
leading: MacosIcon(CupertinoIcons.profile_circled),
title: Text('Fruta User'),
subtitle: Text('user@fruta.com'),
),
),
child: IndexedStack(
index: pageIndex,
Expand Down
30 changes: 15 additions & 15 deletions lib/macos_screens/drink_details.dart
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ class _DrinkDetailsState extends State<DrinkDetails> {
return snapshot.hasData
? MacosScaffold(
toolBar: ToolBar(
title: Text(widget.smoothie.smoothieName!),
title: Text(widget.smoothie.smoothieName),
titleWidth: 250,
actions: [
ToolBarIconButton(
label: 'Favourite',
icon: favBox.containsKey(widget.smoothie.smoothieName!)
icon: favBox.containsKey(widget.smoothie.smoothieName)
? Icon(
CupertinoIcons.heart_solid,
color: MacosTheme.of(context).primaryColor,
Expand All @@ -69,17 +69,17 @@ class _DrinkDetailsState extends State<DrinkDetails> {
onPressed: () {
setState(() {
if (favBox
.containsKey(widget.smoothie.smoothieName!)) {
favBox.delete(widget.smoothie.smoothieName!);
.containsKey(widget.smoothie.smoothieName)) {
favBox.delete(widget.smoothie.smoothieName);
} else {
favBox.put(widget.smoothie.smoothieName!, {
'name': widget.smoothie.smoothieName!,
favBox.put(widget.smoothie.smoothieName, {
'name': widget.smoothie.smoothieName,
'image': widget.smoothie.imagePath,
'calories': widget.smoothie.calories,
'desc': widget.smoothie.description,
'ingredients': [
for (var item in widget.smoothie.ingredients!)
item.localizedFoodItemNames!.en
for (var item in widget.smoothie.ingredients)
item.localizedFoodItemNames.en
].join(', '),
});
}
Expand Down Expand Up @@ -122,8 +122,8 @@ class _DrinkDetailsState extends State<DrinkDetails> {
.spaceBetween,
children: [
Text(
widget.smoothie
.description!,
widget
.smoothie.description,
style: MacosTheme.of(
context)
.typography
Expand All @@ -134,7 +134,7 @@ class _DrinkDetailsState extends State<DrinkDetails> {
.bold),
),
Text(
'${widget.smoothie.calories!} Calories',
'${widget.smoothie.calories} Calories',
style: MacosTheme.of(
context)
.typography
Expand All @@ -157,7 +157,7 @@ class _DrinkDetailsState extends State<DrinkDetails> {
child: SizedBox(
width: 200,
child: Image.asset(
widget.smoothie.imagePath!,
widget.smoothie.imagePath,
fit: BoxFit.cover),
),
),
Expand All @@ -184,15 +184,15 @@ class _DrinkDetailsState extends State<DrinkDetails> {
height: 200,
child: ListView.separated(
itemCount:
smoothieDetails.ingredients!.length,
smoothieDetails.ingredients.length,
shrinkWrap: true,
scrollDirection: Axis.horizontal,
physics:
const NeverScrollableScrollPhysics(),
itemBuilder:
(BuildContext context, int index) {
var singleIngredient =
smoothieDetails.ingredients![index];
smoothieDetails.ingredients[index];
return GestureDetector(
child: IngredientGridItem(
singleIngredient:
Expand Down Expand Up @@ -240,7 +240,7 @@ class _DrinkDetailsState extends State<DrinkDetails> {
Brightness.dark
? MacosColors.white
: MacosColors.black,
buttonSize: ButtonSize.large,
controlSize: ControlSize.large,
onPressed: () {},
child: Row(
mainAxisAlignment:
Expand Down
4 changes: 2 additions & 2 deletions lib/macos_screens/favourites_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ class MacosFavouritesScreen extends StatelessWidget {
message: const Text(
'Are you sure you want to clear your favourites?\nThis action cannot be undone.'),
primaryButton: PushButton(
buttonSize: ButtonSize.large,
controlSize: ControlSize.large,
color: MacosColors.systemRedColor,
onPressed: () {
Hive.box('frutaFavourites').clear();
},
child: const Text('Delete')),
secondaryButton: PushButton(
buttonSize: ButtonSize.large,
controlSize: ControlSize.large,
onPressed: () => Navigator.of(context).pop(),
child: const Text('Cancel'),
),
Expand Down
Loading

0 comments on commit cbbfbce

Please sign in to comment.