Skip to content
Merged
Show file tree
Hide file tree
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
33 changes: 33 additions & 0 deletions ios_widget_catalog_compare/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# This file configures the analyzer, which statically analyzes Dart code to
# check for errors, warnings, and lints.
#
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
# invoked from the command line by running `flutter analyze`.

# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
include: package:flutter_lints/flutter.yaml

analyzer:
exclude:
- build/**
- ios/**

linter:
# The lint rules applied to this project can be customized in the
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
# included above or to enable additional rules. A list of all available lints
# and their documentation is published at https://dart.dev/lints.
#
# Instead of disabling a lint rule for the entire project in the
# section below, it can also be suppressed for a single line of code
# or a specific dart file by using the `// ignore: name_of_lint` and
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
rules:
# avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule

# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
2 changes: 0 additions & 2 deletions ios_widget_catalog_compare/ios/Flutter/AppFrameworkInfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,5 @@
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>9.0</string>
</dict>
</plist>
15 changes: 9 additions & 6 deletions ios_widget_catalog_compare/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objectVersion = 54;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -141,7 +141,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1020;
LastUpgradeCheck = 1510;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
Expand Down Expand Up @@ -185,10 +185,12 @@
/* Begin PBXShellScriptBuildPhase section */
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
);
name = "Thin Binary";
outputPaths = (
Expand All @@ -199,6 +201,7 @@
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
Expand Down Expand Up @@ -288,7 +291,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 = 15.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Expand Down Expand Up @@ -373,7 +376,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 = 15.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -422,7 +425,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 = 15.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Expand Down Expand Up @@ -518,4 +521,4 @@
/* End XCConfigurationList section */
};
rootObject = 97C146E61CF9000F007C117D /* Project object */;
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1020"
LastUpgradeVersion = "1510"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -26,6 +26,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
Expand All @@ -45,11 +46,13 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
enableGPUValidationMode = "1"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
Expand Down
2 changes: 1 addition & 1 deletion ios_widget_catalog_compare/ios/Runner/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import UIKit
import Flutter

@UIApplicationMain
@main
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
Expand Down
4 changes: 4 additions & 0 deletions ios_widget_catalog_compare/ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,9 @@
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
</dict>
</plist>
54 changes: 28 additions & 26 deletions ios_widget_catalog_compare/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,19 @@
import 'package:flutter/services.dart';
import 'package:flutter/cupertino.dart';

const EventChannel _platformEventChannel =
const EventChannel('overlay_ios.flutter.io/responder');
const EventChannel _platformEventChannel = EventChannel(
'overlay_ios.flutter.io/responder',
);

void main() {
runApp(
CupertinoApp(
title: 'Flutter Demo',
home: FlutterDemo(),
),
);
runApp(CupertinoApp(title: 'Flutter Demo', home: FlutterDemo()));
}

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

@override
_FlutterDemoState createState() => _FlutterDemoState();
State<FlutterDemo> createState() => _FlutterDemoState();
}

class _FlutterDemoState extends State<FlutterDemo> {
Expand Down Expand Up @@ -59,13 +55,13 @@ class _FlutterDemoState extends State<FlutterDemo> {
case 'CupertinoButton':
return CupertinoButton(
child: Text('Button'),
onPressed: () {/** */},
onPressed: () {
/** */
},
);

case 'CupertinoTextField':
return CupertinoTextField(
placeholder: "Placeholder",
);
return CupertinoTextField(placeholder: "Placeholder");

case 'CupertinoPicker':
return CupertinoPicker(
Expand All @@ -87,10 +83,10 @@ class _FlutterDemoState extends State<FlutterDemo> {
return CupertinoSearchTextField(
controller: textController,
onChanged: (value) {
print("The text has changed to: " + value);
debugPrint("The text has changed to: $value");
},
onSubmitted: (value) {
print("Submitted text: " + value);
debugPrint("Submitted text: $value");
},
);

Expand Down Expand Up @@ -153,10 +149,10 @@ class _FlutterDemoState extends State<FlutterDemo> {
CupertinoFormRow(
prefix: Text('Toggle'),
child: CupertinoSwitch(
value: this.toggleValue,
value: toggleValue,
onChanged: (value) {
setState(() {
this.toggleValue = value;
toggleValue = value;
});
},
),
Expand All @@ -165,7 +161,9 @@ class _FlutterDemoState extends State<FlutterDemo> {
),
Padding(
padding: const EdgeInsets.symmetric(
vertical: 16.0, horizontal: 16.0),
vertical: 16.0,
horizontal: 16.0,
),
child: CupertinoButton(
onPressed: () {
if (_formKey.currentState?.validate() ?? false) {
Expand All @@ -175,8 +173,9 @@ class _FlutterDemoState extends State<FlutterDemo> {
title: Text('Validated'),
actions: [
CupertinoDialogAction(
child: Text('Ok'),
onPressed: () => Navigator.pop(context)),
child: Text('Ok'),
onPressed: () => Navigator.pop(context),
),
],
),
);
Expand Down Expand Up @@ -249,10 +248,10 @@ class _FlutterDemoState extends State<FlutterDemo> {
CupertinoFormRow(
prefix: Text('Toggle'),
child: CupertinoSwitch(
value: this.toggleValue,
value: toggleValue,
onChanged: (value) {
setState(() {
this.toggleValue = value;
toggleValue = value;
});
},
),
Expand All @@ -261,7 +260,9 @@ class _FlutterDemoState extends State<FlutterDemo> {
),
Padding(
padding: const EdgeInsets.symmetric(
vertical: 16.0, horizontal: 16.0),
vertical: 16.0,
horizontal: 16.0,
),
child: CupertinoButton(
onPressed: () {
if (_formKey.currentState?.validate() ?? false) {
Expand All @@ -271,8 +272,9 @@ class _FlutterDemoState extends State<FlutterDemo> {
title: Text('Validated'),
actions: [
CupertinoDialogAction(
child: Text('Ok'),
onPressed: () => Navigator.pop(context)),
child: Text('Ok'),
onPressed: () => Navigator.pop(context),
),
],
),
);
Expand Down
Loading
Loading