Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate deprecated APIs to Flutter 3.24.3-compatible code #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ios/Flutter/AppFrameworkInfo.plist
Original file line number Diff line number Diff line change
@@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>9.0</string>
<string>12.0</string>
</dict>
</plist>
13 changes: 8 additions & 5 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objectVersion = 54;
objects = {

/* Begin PBXBuildFile section */
@@ -127,7 +127,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1300;
LastUpgradeCheck = 1510;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
@@ -171,10 +171,12 @@
/* Begin PBXShellScriptBuildPhase section */
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
);
name = "Thin Binary";
outputPaths = (
@@ -185,6 +187,7 @@
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
@@ -272,7 +275,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
@@ -349,7 +352,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@@ -398,7 +401,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
LastUpgradeVersion = "1510"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
2 changes: 1 addition & 1 deletion ios/Runner/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import UIKit
import Flutter

@UIApplicationMain
@main
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
4 changes: 4 additions & 0 deletions ios/Runner/Info.plist
Original file line number Diff line number Diff line change
@@ -43,5 +43,9 @@
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<true/>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
</dict>
</plist>
2 changes: 1 addition & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@ class MyApp extends StatelessWidget {
elevation: 0,
),
textTheme: const TextTheme(
bodyText2: TextStyle(color: Colors.black54),
bodyMedium: TextStyle(color: Colors.black54),
),
),
home: const HomeScreen(),
8 changes: 4 additions & 4 deletions lib/screens/details/details_screen.dart
Original file line number Diff line number Diff line change
@@ -56,13 +56,13 @@ class DetailsScreen extends StatelessWidget {
Expanded(
child: Text(
product.title,
style: Theme.of(context).textTheme.headline6,
style: Theme.of(context).textTheme.titleLarge,
),
),
const SizedBox(width: defaultPadding),
Text(
"\$" + product.price.toString(),
style: Theme.of(context).textTheme.headline6,
style: Theme.of(context).textTheme.titleLarge,
),
],
),
@@ -74,7 +74,7 @@ class DetailsScreen extends StatelessWidget {
),
Text(
"Colors",
style: Theme.of(context).textTheme.subtitle2,
style: Theme.of(context).textTheme.titleSmall,
),
const SizedBox(height: defaultPadding / 2),
Row(
@@ -101,7 +101,7 @@ class DetailsScreen extends StatelessWidget {
child: ElevatedButton(
onPressed: () {},
style: ElevatedButton.styleFrom(
primary: primaryColor,
backgroundColor: primaryColor,
shape: const StadiumBorder()),
child: const Text("Add to Cart"),
),
2 changes: 1 addition & 1 deletion lib/screens/home/components/categories.dart
Original file line number Diff line number Diff line change
@@ -57,7 +57,7 @@ class CategoryCard extends StatelessWidget {
const SizedBox(height: defaultPadding / 2),
Text(
title,
style: Theme.of(context).textTheme.subtitle2,
style: Theme.of(context).textTheme.titleSmall,
)
],
),
2 changes: 1 addition & 1 deletion lib/screens/home/components/product_card.dart
Original file line number Diff line number Diff line change
@@ -53,7 +53,7 @@ class ProductCard extends StatelessWidget {
const SizedBox(width: defaultPadding / 4),
Text(
"\$" + price.toString(),
style: Theme.of(context).textTheme.subtitle2,
style: Theme.of(context).textTheme.titleSmall,
),
],
)
3 changes: 1 addition & 2 deletions lib/screens/home/components/search_form.dart
Original file line number Diff line number Diff line change
@@ -3,7 +3,6 @@ import 'package:flutter_svg/flutter_svg.dart';

import '../../../constants.dart';


const OutlineInputBorder outlineInputBorder = OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(12)),
borderSide: BorderSide.none,
@@ -39,7 +38,7 @@ class SearchForm extends StatelessWidget {
height: 48,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
primary: primaryColor,
backgroundColor: primaryColor,
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(12)),
),
2 changes: 1 addition & 1 deletion lib/screens/home/components/section_title.dart
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@ class SectionTitle extends StatelessWidget {
children: [
Text(
title,
style: Theme.of(context).textTheme.subtitle1!.copyWith(
style: Theme.of(context).textTheme.titleMedium!.copyWith(
color: Colors.black,
fontWeight: FontWeight.w500,
),
4 changes: 2 additions & 2 deletions lib/screens/home/home_screen.dart
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ class HomeScreen extends StatelessWidget {
const SizedBox(width: defaultPadding / 2),
Text(
"15/2 New Texas",
style: Theme.of(context).textTheme.bodyText1,
style: Theme.of(context).textTheme.bodyLarge,
),
],
),
@@ -47,7 +47,7 @@ class HomeScreen extends StatelessWidget {
"Explore",
style: Theme.of(context)
.textTheme
.headline4!
.headlineMedium!
.copyWith(fontWeight: FontWeight.w500, color: Colors.black),
),
const Text(
Loading