Merge branch 'main' into tb-auth-token-repository-typo

pull/2868/head
Tanya Bouman 1 day ago committed by GitHub
commit 222713263a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -19,8 +19,8 @@ jobs:
runs-on: ubuntu-latest
if: github.repository == 'flutter/samples'
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10
- uses: actions/setup-java@1bcf9fb12cf4aa7d266a90ae39939e61372fe520
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
- uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6
with:
distribution: 'zulu'
java-version: '17'

@ -22,8 +22,8 @@ jobs:
strategy:
fail-fast: false
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10
- uses: actions/setup-java@1bcf9fb12cf4aa7d266a90ae39939e61372fe520
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
- uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6
with:
distribution: 'zulu'
java-version: '17'

@ -144,7 +144,7 @@ jobs:
- name: 'Checkout PR branch'
if: |-
${{ steps.get_context.outputs.is_pr == 'true' }}
uses: 'actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10' # ratchet:actions/checkout@v4
uses: 'actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1' # ratchet:actions/checkout@v4
with:
token: '${{ steps.generate_token.outputs.token || secrets.GITHUB_TOKEN }}'
repository: '${{ github.repository }}'
@ -154,7 +154,7 @@ jobs:
- name: 'Checkout main branch'
if: |-
${{ steps.get_context.outputs.is_pr == 'false' }}
uses: 'actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10' # ratchet:actions/checkout@v4
uses: 'actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1' # ratchet:actions/checkout@v4
with:
token: '${{ steps.generate_token.outputs.token || secrets.GITHUB_TOKEN }}'
repository: '${{ github.repository }}'

@ -44,7 +44,7 @@ jobs:
steps:
- name: 'Checkout repository'
uses: 'actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10' # ratchet:actions/checkout@v4
uses: 'actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1' # ratchet:actions/checkout@v4
- name: 'Generate GitHub App Token'
id: 'generate_token'

@ -26,7 +26,7 @@ jobs:
steps:
- name: 'Checkout repository'
uses: 'actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10' # ratchet:actions/checkout@v4
uses: 'actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1' # ratchet:actions/checkout@v4
- name: 'Generate GitHub App Token'
id: 'generate_token'

@ -66,7 +66,7 @@ jobs:
steps:
- name: 'Checkout PR code'
uses: 'actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10' # ratchet:actions/checkout@v4
uses: 'actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1' # ratchet:actions/checkout@v4
- name: 'Generate GitHub App Token'
id: 'generate_token'

@ -24,11 +24,11 @@ jobs:
strategy:
fail-fast: false
matrix:
flutter_version: [stable]
flutter_version: [stable, beta]
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10
- uses: actions/setup-java@1bcf9fb12cf4aa7d266a90ae39939e61372fe520
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
- uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6
with:
distribution: 'zulu'
java-version: '17'

@ -1 +1 @@
include: package:analysis_defaults/flutter.yaml
include: ../../../analysis_options.yaml

@ -1 +1 @@
include: package:analysis_defaults/flutter.yaml
include: ../../../analysis_options.yaml

@ -1 +1 @@
include: package:analysis_defaults/flutter.yaml
include: ../../../analysis_options.yaml

@ -15,7 +15,7 @@ dependencies:
dev_dependencies:
analysis_defaults:
path: ../../../analysis_defaults
pigeon: ">=11.0.0 <27.0.0"
pigeon: ">=11.0.0 <30.0.0"
flutter_test:
sdk: flutter

@ -1,5 +1,4 @@
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
platform :ios, '15.0'
flutter_application_path = '../flutter_module_books/'
load File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb')

@ -1 +1 @@
include: package:analysis_defaults/flutter.yaml
include: ../../../analysis_options.yaml

@ -2,20 +2,34 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import UIKit
import Flutter
import UIKit
@UIApplicationMain
@main
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
var flutterEngine: FlutterEngine?
var flutterEngine : FlutterEngine?
func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
// Instantiate Flutter engine
self.flutterEngine = FlutterEngine(name: "io.flutter", project: nil)
self.flutterEngine?.run(withEntrypoint: nil)
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Instantiate Flutter engine
self.flutterEngine = FlutterEngine(name: "io.flutter", project: nil)
self.flutterEngine?.run(withEntrypoint: nil)
return true
}
return true
}
func application(
_ application: UIApplication,
configurationForConnecting connectingSceneSession: UISceneSession,
options: UIScene.ConnectionOptions
) -> UISceneConfiguration {
let configuration = UISceneConfiguration(
name: "Default Configuration",
sessionRole: connectingSceneSession.role
)
configuration.delegateClass = FlutterSceneDelegate.self
return configuration
}
}

@ -20,6 +20,27 @@
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<false/>
<key>UISceneConfigurations</key>
<dict>
<key>UIWindowSceneSessionRoleApplication</key>
<array>
<dict>
<key>UISceneClassName</key>
<string>UIWindowScene</string>
<key>UISceneConfigurationName</key>
<string>Default Configuration</string>
<key>UISceneDelegateClassName</key>
<string>FlutterSceneDelegate</string>
<key>UISceneStoryboardFile</key>
<string>Main</string>
</dict>
</array>
</dict>
</dict>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>

@ -20,6 +20,27 @@
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<false/>
<key>UISceneConfigurations</key>
<dict>
<key>UIWindowSceneSessionRoleApplication</key>
<array>
<dict>
<key>UISceneClassName</key>
<string>UIWindowScene</string>
<key>UISceneConfigurationName</key>
<string>Default Configuration</string>
<key>UISceneDelegateClassName</key>
<string>FlutterSceneDelegate</string>
<key>UISceneStoryboardFile</key>
<string>Main</string>
</dict>
</array>
</dict>
</dict>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>

@ -1,5 +1,4 @@
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
platform :ios, '15.0'
flutter_application_path = '../flutter_module_fullscreen'
load File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb')

@ -1,4 +0,0 @@
include: package:flutter_lints/flutter.yaml
# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options

@ -1,5 +1,4 @@
# Uncomment the next line to define a global platform for your project
# platform :ios, '15.0'
platform :ios, '15.0'
flutter_application_path = '../flutter_module'
load File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb')

@ -5,48 +5,8 @@
// Created by Louise Hsu on 12/3/25.
//
import Flutter
import UIKit
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
var window: UIWindow?
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
// Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`.
// If using a storyboard, the `window` property will automatically be initialized and attached to the scene.
// This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead).
guard let _ = (scene as? UIWindowScene) else { return }
}
func sceneDidDisconnect(_ scene: UIScene) {
// Called as the scene is being released by the system.
// This occurs shortly after the scene enters the background, or when its session is discarded.
// Release any resources associated with this scene that can be re-created the next time the scene connects.
// The scene may re-connect later, as its session was not necessarily discarded (see `application:didDiscardSceneSessions` instead).
}
func sceneDidBecomeActive(_ scene: UIScene) {
// Called when the scene has moved from an inactive state to an active state.
// Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive.
}
func sceneWillResignActive(_ scene: UIScene) {
// Called when the scene will move from an active state to an inactive state.
// This may occur due to temporary interruptions (ex. an incoming phone call).
}
func sceneWillEnterForeground(_ scene: UIScene) {
// Called as the scene transitions from the background to the foreground.
// Use this method to undo the changes made on entering the background.
}
func sceneDidEnterBackground(_ scene: UIScene) {
// Called as the scene transitions from the foreground to the background.
// Use this method to save data, release shared resources, and store enough scene-specific state information
// to restore the scene back to its current state.
}
class SceneDelegate: FlutterSceneDelegate {
}

@ -2,31 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import Flutter
import UIKit
/// The UIWindowSceneDelegate for the app.
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
var window: UIWindow?
func scene(
_ scene: UIScene, willConnectTo session: UISceneSession,
options connectionOptions: UIScene.ConnectionOptions
) {
guard let _ = (scene as? UIWindowScene) else { return }
}
func sceneDidDisconnect(_ scene: UIScene) {
}
func sceneDidBecomeActive(_ scene: UIScene) {
}
func sceneWillResignActive(_ scene: UIScene) {
}
func sceneWillEnterForeground(_ scene: UIScene) {
}
func sceneDidEnterBackground(_ scene: UIScene) {
}
class SceneDelegate: FlutterSceneDelegate {
}

@ -39,7 +39,7 @@ class SingleFlutterViewController: FlutterViewController, DataModelObserver {
override func viewDidLoad() {
super.viewDidLoad()
channel = FlutterMethodChannel(
name: "multiple-flutters", binaryMessenger: self.engine!.binaryMessenger)
name: "multiple-flutters", binaryMessenger: self.engine.binaryMessenger)
channel!.invokeMethod("setCount", arguments: DataModel.shared.count)
let navController = self.navigationController!
channel!.setMethodCallHandler { (call: FlutterMethodCall, result: @escaping FlutterResult) in

@ -1,3 +1,5 @@
platform :ios, '15.0'
# Copyright 2021 The Flutter team. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

@ -1 +1 @@
include: package:analysis_defaults/flutter.yaml
include: ../../../analysis_options.yaml

@ -1 +1 @@
include: package:analysis_defaults/flutter.yaml
include: ../../../analysis_options.yaml

@ -2,22 +2,36 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import UIKit
import Flutter
import FlutterPluginRegistrant
import UIKit
@UIApplicationMain
@main
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
var flutterEngine : FlutterEngine?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Instantiate Flutter engine
self.flutterEngine = FlutterEngine(name: "io.flutter", project: nil)
self.flutterEngine?.run(withEntrypoint: nil)
GeneratedPluginRegistrant.register(with: self.flutterEngine!)
var flutterEngine: FlutterEngine?
func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
// Instantiate Flutter engine
self.flutterEngine = FlutterEngine(name: "io.flutter", project: nil)
self.flutterEngine?.run(withEntrypoint: nil)
GeneratedPluginRegistrant.register(with: self.flutterEngine!)
return true
}
return true
}
func application(
_ application: UIApplication,
configurationForConnecting connectingSceneSession: UISceneSession,
options: UIScene.ConnectionOptions
) -> UISceneConfiguration {
let configuration = UISceneConfiguration(
name: "Default Configuration",
sessionRole: connectingSceneSession.role
)
configuration.delegateClass = FlutterSceneDelegate.self
return configuration
}
}

@ -20,6 +20,27 @@
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<false/>
<key>UISceneConfigurations</key>
<dict>
<key>UIWindowSceneSessionRoleApplication</key>
<array>
<dict>
<key>UISceneClassName</key>
<string>UIWindowScene</string>
<key>UISceneConfigurationName</key>
<string>Default Configuration</string>
<key>UISceneDelegateClassName</key>
<string>FlutterSceneDelegate</string>
<key>UISceneStoryboardFile</key>
<string>Main</string>
</dict>
</array>
</dict>
</dict>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>

@ -20,6 +20,27 @@
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<false/>
<key>UISceneConfigurations</key>
<dict>
<key>UIWindowSceneSessionRoleApplication</key>
<array>
<dict>
<key>UISceneClassName</key>
<string>UIWindowScene</string>
<key>UISceneConfigurationName</key>
<string>Default Configuration</string>
<key>UISceneDelegateClassName</key>
<string>FlutterSceneDelegate</string>
<key>UISceneStoryboardFile</key>
<string>Main</string>
</dict>
</array>
</dict>
</dict>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>

@ -1,5 +1,4 @@
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
platform :ios, '15.0'
flutter_application_path = '../flutter_module_using_plugin'
load File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb')

@ -1 +1 @@
include: package:analysis_defaults/flutter.yaml
include: ../../../analysis_options.yaml

@ -2,20 +2,34 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import UIKit
import Flutter
import UIKit
@UIApplicationMain
@main
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
var flutterEngine: FlutterEngine?
var flutterEngine : FlutterEngine?
func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
// Instantiate Flutter engine
self.flutterEngine = FlutterEngine(name: "io.flutter", project: nil)
self.flutterEngine?.run(withEntrypoint: nil)
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Instantiate Flutter engine
self.flutterEngine = FlutterEngine(name: "io.flutter", project: nil)
self.flutterEngine?.run(withEntrypoint: nil)
return true
}
return true
}
func application(
_ application: UIApplication,
configurationForConnecting connectingSceneSession: UISceneSession,
options: UIScene.ConnectionOptions
) -> UISceneConfiguration {
let configuration = UISceneConfiguration(
name: "Default Configuration",
sessionRole: connectingSceneSession.role
)
configuration.delegateClass = FlutterSceneDelegate.self
return configuration
}
}

@ -20,6 +20,27 @@
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<false/>
<key>UISceneConfigurations</key>
<dict>
<key>UIWindowSceneSessionRoleApplication</key>
<array>
<dict>
<key>UISceneClassName</key>
<string>UIWindowScene</string>
<key>UISceneConfigurationName</key>
<string>Default Configuration</string>
<key>UISceneDelegateClassName</key>
<string>FlutterSceneDelegate</string>
<key>UISceneStoryboardFile</key>
<string>Main</string>
</dict>
</array>
</dict>
</dict>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>

@ -20,6 +20,27 @@
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<false/>
<key>UISceneConfigurations</key>
<dict>
<key>UIWindowSceneSessionRoleApplication</key>
<array>
<dict>
<key>UISceneClassName</key>
<string>UIWindowScene</string>
<key>UISceneConfigurationName</key>
<string>Default Configuration</string>
<key>UISceneDelegateClassName</key>
<string>FlutterSceneDelegate</string>
<key>UISceneStoryboardFile</key>
<string>Main</string>
</dict>
</array>
</dict>
</dict>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>

@ -0,0 +1,11 @@
include: package:analysis_defaults/flutter.yaml
analyzer:
exclude:
- build/**
- android/**
- ios/**
- web/**
- windows/**
- macos/**
- linux/**

@ -1 +1 @@
include: package:analysis_defaults/flutter.yaml
include: ../analysis_options.yaml

@ -0,0 +1,32 @@
#
# Generated file, do not edit.
#
import lldb
def handle_new_rx_page(frame: lldb.SBFrame, bp_loc, extra_args, intern_dict):
"""Intercept NOTIFY_DEBUGGER_ABOUT_RX_PAGES and touch the pages."""
base = frame.register["x0"].GetValueAsAddress()
page_len = frame.register["x1"].GetValueAsUnsigned()
# Note: NOTIFY_DEBUGGER_ABOUT_RX_PAGES will check contents of the
# first page to see if handled it correctly. This makes diagnosing
# misconfiguration (e.g. missing breakpoint) easier.
data = bytearray(page_len)
data[0:8] = b'IHELPED!'
error = lldb.SBError()
frame.GetThread().GetProcess().WriteMemory(base, data, error)
if not error.Success():
print(f'Failed to write into {base}[+{page_len}]', error)
return
def __lldb_init_module(debugger: lldb.SBDebugger, _):
target = debugger.GetDummyTarget()
# Caveat: must use BreakpointCreateByRegEx here and not
# BreakpointCreateByName. For some reasons callback function does not
# get carried over from dummy target for the later.
bp = target.BreakpointCreateByRegex("^NOTIFY_DEBUGGER_ABOUT_RX_PAGES$")
bp.SetScriptCallbackFunction('{}.handle_new_rx_page'.format(__name__))
bp.SetAutoContinue(True)
print("-- LLDB integration loaded --")

@ -0,0 +1,5 @@
#
# Generated file, do not edit.
#
command script import --relative-to-command-file flutter_lldb_helper.py

@ -0,0 +1,12 @@
FLUTTER_ROOT=/Users/ewindmill/development/flutter
FLUTTER_APPLICATION_PATH=/Users/ewindmill/development/samples/animation_gallery
FLUTTER_FRAMEWORK_SWIFT_PACKAGE_PATH=/Users/ewindmill/development/samples/animation_gallery/ios/Flutter/ephemeral/Packages/.packages/FlutterFramework
COCOAPODS_PARALLEL_CODE_SIGN=true
FLUTTER_TARGET=lib/main.dart
FLUTTER_BUILD_DIR=build
FLUTTER_BUILD_NAME=1.0.0
FLUTTER_BUILD_NUMBER=1
DART_OBFUSCATION=false
TRACK_WIDGET_CREATION=true
TREE_SHAKE_ICONS=false
PACKAGE_CONFIG=.dart_tool/package_config.json

@ -0,0 +1,12 @@
// This is a generated file; do not edit or check into version control.
FLUTTER_ROOT=/Users/ewindmill/development/flutter
FLUTTER_APPLICATION_PATH=/Users/ewindmill/development/samples/animation_gallery
FLUTTER_FRAMEWORK_SWIFT_PACKAGE_PATH=/Users/ewindmill/development/samples/animation_gallery/macos/Flutter/ephemeral/Packages/.packages/FlutterFramework
COCOAPODS_PARALLEL_CODE_SIGN=true
FLUTTER_BUILD_DIR=build
FLUTTER_BUILD_NAME=1.0.0
FLUTTER_BUILD_NUMBER=1
DART_OBFUSCATION=false
TRACK_WIDGET_CREATION=true
TREE_SHAKE_ICONS=false
PACKAGE_CONFIG=.dart_tool/package_config.json

@ -0,0 +1,13 @@
#!/bin/sh
# This is a generated file; do not edit or check into version control.
export "FLUTTER_ROOT=/Users/ewindmill/development/flutter"
export "FLUTTER_APPLICATION_PATH=/Users/ewindmill/development/samples/animation_gallery"
export "FLUTTER_FRAMEWORK_SWIFT_PACKAGE_PATH=/Users/ewindmill/development/samples/animation_gallery/macos/Flutter/ephemeral/Packages/.packages/FlutterFramework"
export "COCOAPODS_PARALLEL_CODE_SIGN=true"
export "FLUTTER_BUILD_DIR=build"
export "FLUTTER_BUILD_NAME=1.0.0"
export "FLUTTER_BUILD_NUMBER=1"
export "DART_OBFUSCATION=false"
export "TRACK_WIDGET_CREATION=true"
export "TREE_SHAKE_ICONS=false"
export "PACKAGE_CONFIG=.dart_tool/package_config.json"

@ -0,0 +1,11 @@
FLUTTER_ROOT=/Users/ewindmill/development/flutter
FLUTTER_APPLICATION_PATH=/Users/ewindmill/development/samples/animation_gallery
FLUTTER_FRAMEWORK_SWIFT_PACKAGE_PATH=/Users/ewindmill/development/samples/animation_gallery/macos/Flutter/ephemeral/Packages/.packages/FlutterFramework
COCOAPODS_PARALLEL_CODE_SIGN=true
FLUTTER_BUILD_DIR=build
FLUTTER_BUILD_NAME=1.0.0
FLUTTER_BUILD_NUMBER=1
DART_OBFUSCATION=false
TRACK_WIDGET_CREATION=true
TREE_SHAKE_ICONS=false
PACKAGE_CONFIG=.dart_tool/package_config.json

@ -1 +1 @@
include: package:analysis_defaults/flutter.yaml
include: ../analysis_options.yaml

@ -1,13 +1,16 @@
import UIKit
import Flutter
import UIKit
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
@main
@objc class AppDelegate: FlutterAppDelegate, FlutterImplicitEngineDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
func didInitializeImplicitFlutterEngine(_ engineBridge: FlutterImplicitEngineBridge) {
GeneratedPluginRegistrant.register(with: engineBridge.pluginRegistry)
}
}

@ -24,6 +24,27 @@
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<false/>
<key>UISceneConfigurations</key>
<dict>
<key>UIWindowSceneSessionRoleApplication</key>
<array>
<dict>
<key>UISceneClassName</key>
<string>UIWindowScene</string>
<key>UISceneConfigurationName</key>
<string>flutter</string>
<key>UISceneDelegateClassName</key>
<string>FlutterSceneDelegate</string>
<key>UISceneStoryboardFile</key>
<string>Main</string>
</dict>
</array>
</dict>
</dict>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>

@ -1,30 +1,10 @@
# This file configures the static analysis results for your project (errors,
# warnings, and lints).
#
# This enables the 'recommended' set of lints from `package:lints`.
# This set helps identify many issues that may lead to problems when running
# or consuming Dart code, and enforces writing Dart using a single, idiomatic
# style and format.
#
# If you want a smaller set of lints you can change this to specify
# 'package:lints/core.yaml'. These are just the most critical lints
# (the recommended set includes the core lints).
# The core lints are also what is used by pub.dev for scoring packages.
include: package:lints/recommended.yaml
# Uncomment the following section to specify additional rules.
# linter:
# rules:
# - camel_case_types
# analyzer:
# exclude:
# - path/to/excluded/files/**
# For more information about the core and recommended set of lints, see
# https://dart.dev/go/core-lints
# For additional information about configuring this file, see
# https://dart.dev/guides/language/analysis-options
analyzer:
exclude:
- build/**
- android/**
- ios/**
- web/**
- windows/**
- macos/**
- linux/**
include: ../../analysis_options.yaml

@ -16,8 +16,8 @@ int main(List<String> arguments) {
..addOption(outputOptionName, mandatory: true, abbr: 'o');
ArgResults argResults = parser.parse(arguments);
final String inputFilePath = argResults[inputOptionName];
final String outputFilePath = argResults[outputOptionName];
final String inputFilePath = argResults[inputOptionName] as String;
final String outputFilePath = argResults[outputOptionName] as String;
try {
final Image image = decodeImage(File(inputFilePath).readAsBytesSync())!;

@ -2,12 +2,15 @@ import Flutter
import UIKit
@main
@objc class AppDelegate: FlutterAppDelegate {
@objc class AppDelegate: FlutterAppDelegate, FlutterImplicitEngineDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
func didInitializeImplicitFlutterEngine(_ engineBridge: FlutterImplicitEngineBridge) {
GeneratedPluginRegistrant.register(with: engineBridge.pluginRegistry)
}
}

@ -24,6 +24,27 @@
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<false/>
<key>UISceneConfigurations</key>
<dict>
<key>UIWindowSceneSessionRoleApplication</key>
<array>
<dict>
<key>UISceneClassName</key>
<string>UIWindowScene</string>
<key>UISceneConfigurationName</key>
<string>flutter</string>
<key>UISceneDelegateClassName</key>
<string>FlutterSceneDelegate</string>
<key>UISceneStoryboardFile</key>
<string>Main</string>
</dict>
</array>
</dict>
</dict>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>

@ -1,8 +1,8 @@
import 'package:flutter_test/flutter_test.dart';
import 'package:asset_transformation/main.dart';
import 'package:flutter_test/flutter_test.dart';
void main() {
testWidgets('app can render without exceptions', (WidgetTester tester) async {
testWidgets('app can render without exceptions', (tester) async {
await tester.pumpWidget(const MainApp());
});
}

@ -1 +1 @@
include: package:analysis_defaults/flutter.yaml
include: ../analysis_options.yaml

@ -1,5 +1,3 @@
include: package:flutter_lints/flutter.yaml
linter:
rules:
- combinators_ordering
@ -9,3 +7,14 @@ linter:
- prefer_final_in_for_each
- prefer_final_locals
- prefer_relative_imports
analyzer:
exclude:
- build/**
- android/**
- ios/**
- web/**
- windows/**
- macos/**
- linux/**

@ -1,13 +1,16 @@
import Flutter
import UIKit
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
@main
@objc class AppDelegate: FlutterAppDelegate, FlutterImplicitEngineDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
func didInitializeImplicitFlutterEngine(_ engineBridge: FlutterImplicitEngineBridge) {
GeneratedPluginRegistrant.register(with: engineBridge.pluginRegistry)
}
}

@ -24,6 +24,27 @@
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<false/>
<key>UISceneConfigurations</key>
<dict>
<key>UIWindowSceneSessionRoleApplication</key>
<array>
<dict>
<key>UISceneClassName</key>
<string>UIWindowScene</string>
<key>UISceneConfigurationName</key>
<string>flutter</string>
<key>UISceneDelegateClassName</key>
<string>FlutterSceneDelegate</string>
<key>UISceneStoryboardFile</key>
<string>Main</string>
</dict>
</array>
</dict>
</dict>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>

@ -31,7 +31,7 @@ class BookingRepositoryRemote implements BookingRepository {
.map((activity) => activity.ref)
.toList(),
);
return _apiClient.postBooking(bookingApiModel);
return await _apiClient.postBooking(bookingApiModel);
} on Exception catch (e) {
return Result.error(e);
}
@ -121,7 +121,7 @@ class BookingRepositoryRemote implements BookingRepository {
@override
Future<Result<void>> delete(int id) async {
try {
return _apiClient.deleteBooking(id);
return await _apiClient.deleteBooking(id);
} on Exception catch (e) {
return Result.error(e);
}

@ -85,7 +85,6 @@ class BookingCreateUseCase {
switch (saveBookingResult) {
case Ok<void>():
_log.fine('Booking saved successfully');
break;
case Error<void>():
_log.warning('Failed to save booking', saveBookingResult.error);
return Result.error(saveBookingResult.error);

@ -46,9 +46,7 @@ GoRouter router(AuthRepository authRepository) => GoRouter(
authRepository: context.read(),
itineraryConfigRepository: context.read(),
);
return HomeScreenContainer(
logoutViewModel: logoutViewModel,
);
return HomeScreenContainer(logoutViewModel: logoutViewModel);
},
routes: [
GoRoute(

@ -7,7 +7,7 @@ import 'package:flutter/material.dart';
class AppLocalization {
static AppLocalization of(BuildContext context) {
return Localizations.of(context, AppLocalization);
return Localizations.of<AppLocalization>(context, AppLocalization)!;
}
static const _strings = <String, String>{

@ -8,10 +8,7 @@ import '../view_models/home_viewmodel.dart';
import 'home_screen.dart';
class HomeScreenContainer extends StatefulWidget {
const HomeScreenContainer({
super.key,
required this.logoutViewModel,
});
const HomeScreenContainer({super.key, required this.logoutViewModel});
final LogoutViewModel logoutViewModel;

@ -52,7 +52,7 @@ class SearchFormContinent extends StatelessWidget {
scrollDirection: Axis.horizontal,
itemCount: viewModel.continents.length,
padding: Dimens.of(context).edgeInsetsScreenHorizontal,
itemBuilder: (BuildContext context, int index) {
itemBuilder: (context, index) {
final Continent(:imageUrl, :name) = viewModel.continents[index];
return _CarouselItem(
key: ValueKey(name),
@ -61,7 +61,7 @@ class SearchFormContinent extends StatelessWidget {
viewModel: viewModel,
);
},
separatorBuilder: (BuildContext context, int index) {
separatorBuilder: (context, index) {
return const SizedBox(width: 8);
},
);

@ -5,13 +5,11 @@
import FlutterMacOS
import Foundation
import path_provider_foundation
import share_plus
import shared_preferences_foundation
import sqflite_darwin
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin"))
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin"))

@ -35,7 +35,7 @@ dev_dependencies:
integration_test:
sdk: flutter
build_runner: ^2.4.14
freezed: ^3.0.0
freezed: '>=3.0.0 <5.0.0'
json_serializable: ^6.9.0
flutter:

@ -45,14 +45,14 @@ void main() {
);
}
testWidgets('should load screen', (WidgetTester tester) async {
testWidgets('should load screen', (tester) async {
await mockNetworkImages(() async {
await loadScreen(tester);
expect(find.byType(ActivitiesScreen), findsOneWidget);
});
});
testWidgets('should list activity', (WidgetTester tester) async {
testWidgets('should list activity', (tester) async {
await mockNetworkImages(() async {
await loadScreen(tester);
expect(find.byType(ActivityEntry), findsOneWidget);
@ -60,9 +60,7 @@ void main() {
});
});
testWidgets('should select activity and confirm', (
WidgetTester tester,
) async {
testWidgets('should select activity and confirm', (tester) async {
await mockNetworkImages(() async {
await loadScreen(tester);
// Select one activity

@ -32,14 +32,14 @@ void main() {
);
}
testWidgets('should load screen', (WidgetTester tester) async {
testWidgets('should load screen', (tester) async {
await mockNetworkImages(() async {
await loadScreen(tester);
expect(find.byType(LoginScreen), findsOneWidget);
});
});
testWidgets('should perform login', (WidgetTester tester) async {
testWidgets('should perform login', (tester) async {
await mockNetworkImages(() async {
await loadScreen(tester);

@ -43,14 +43,14 @@ void main() {
);
}
testWidgets('should load widget', (WidgetTester tester) async {
testWidgets('should load widget', (tester) async {
await mockNetworkImages(() async {
await loadScreen(tester);
expect(find.byType(LogoutButton), findsOneWidget);
});
});
testWidgets('should perform logout', (WidgetTester tester) async {
testWidgets('should perform logout', (tester) async {
await mockNetworkImages(() async {
await loadScreen(tester);

@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:async';
import 'package:compass_app/domain/models/itinerary_config/itinerary_config.dart';
import 'package:compass_app/domain/use_cases/booking/booking_create_use_case.dart';
import 'package:compass_app/domain/use_cases/booking/booking_share_use_case.dart';
@ -62,20 +64,20 @@ void main() {
);
}
testWidgets('should load screen', (WidgetTester tester) async {
testWidgets('should load screen', (tester) async {
await loadScreen(tester);
expect(find.byType(BookingScreen), findsOneWidget);
});
testWidgets('should display booking from ID', (WidgetTester tester) async {
testWidgets('should display booking from ID', (tester) async {
// Add a booking to repository
bookingRepository.createBooking(kBooking);
unawaited(bookingRepository.createBooking(kBooking));
// Load screen
await loadScreen(tester);
// Load booking with ID 0
viewModel.loadBooking.execute(0);
unawaited(viewModel.loadBooking.execute(0));
// Wait for booking to load
await tester.pumpAndSettle();
@ -84,13 +86,11 @@ void main() {
expect(find.text(kBooking.destination.tags.first), findsOneWidget);
});
testWidgets('should create booking from itinerary config', (
WidgetTester tester,
) async {
testWidgets('should create booking from itinerary config', (tester) async {
await loadScreen(tester);
// Create a new booking from stored itinerary config
viewModel.createBooking.execute();
unawaited(viewModel.createBooking.execute());
// Wait for booking to load
await tester.pumpAndSettle();
@ -102,10 +102,10 @@ void main() {
expect(bookingRepository.bookings.length, 1);
});
testWidgets('should share booking', (WidgetTester tester) async {
bookingRepository.createBooking(kBooking);
testWidgets('should share booking', (tester) async {
unawaited(bookingRepository.createBooking(kBooking));
await loadScreen(tester);
viewModel.loadBooking.execute(0);
unawaited(viewModel.loadBooking.execute(0));
await tester.pumpAndSettle();
await tester.tap(find.byKey(const Key('share-button')));
expect(shared, true);

@ -43,10 +43,7 @@ void main() {
Future<void> loadWidget(WidgetTester tester) async {
await testApp(
tester,
HomeScreen(
viewModel: viewModel,
logoutViewModel: logoutViewModel,
),
HomeScreen(viewModel: viewModel, logoutViewModel: logoutViewModel),
goRouter: goRouter,
);
}

@ -42,14 +42,14 @@ void main() {
);
}
testWidgets('should load screen', (WidgetTester tester) async {
testWidgets('should load screen', (tester) async {
await mockNetworkImages(() async {
await loadScreen(tester);
expect(find.byType(ResultsScreen), findsOneWidget);
});
});
testWidgets('should display destination', (WidgetTester tester) async {
testWidgets('should display destination', (tester) async {
await mockNetworkImages(() async {
await loadScreen(tester);
@ -62,9 +62,7 @@ void main() {
});
});
testWidgets('should tap and navigate to activities', (
WidgetTester tester,
) async {
testWidgets('should tap and navigate to activities', (tester) async {
await mockNetworkImages(() async {
await loadScreen(tester);

@ -25,9 +25,7 @@ void main() {
await testApp(tester, SearchFormContinent(viewModel: viewModel));
}
testWidgets('Should load and select continent', (
WidgetTester tester,
) async {
testWidgets('Should load and select continent', (tester) async {
await loadWidget(tester);
expect(find.byType(SearchFormContinent), findsOneWidget);

@ -26,9 +26,7 @@ void main() {
await testApp(tester, SearchFormDate(viewModel: viewModel));
}
testWidgets('should display date in different month', (
WidgetTester tester,
) async {
testWidgets('should display date in different month', (tester) async {
await loadWidget(tester);
expect(find.byType(SearchFormDate), findsOneWidget);
@ -45,9 +43,7 @@ void main() {
expect(find.text('12 Jun - 23 Jul'), findsOneWidget);
});
testWidgets('should display date in same month', (
WidgetTester tester,
) async {
testWidgets('should display date in same month', (tester) async {
await loadWidget(tester);
expect(find.byType(SearchFormDate), findsOneWidget);

@ -26,7 +26,7 @@ void main() {
await testApp(tester, SearchFormGuests(viewModel: viewModel));
}
testWidgets('Increase number of guests', (WidgetTester tester) async {
testWidgets('Increase number of guests', (tester) async {
await loadWidget(tester);
expect(find.byType(SearchFormGuests), findsOneWidget);
@ -39,7 +39,7 @@ void main() {
expect(find.text('1'), findsOneWidget);
});
testWidgets('Decrease number of guests', (WidgetTester tester) async {
testWidgets('Decrease number of guests', (tester) async {
await loadWidget(tester);
expect(find.byType(SearchFormGuests), findsOneWidget);

@ -46,9 +46,7 @@ void main() {
);
}
testWidgets('Should fill form and perform search', (
WidgetTester tester,
) async {
testWidgets('Should fill form and perform search', (tester) async {
await loadWidget(tester);
expect(find.byType(SearchFormScreen), findsOneWidget);

@ -34,7 +34,7 @@ void main() {
);
}
testWidgets('Should be enabled and allow tap', (WidgetTester tester) async {
testWidgets('Should be enabled and allow tap', (tester) async {
await loadWidget(tester);
expect(find.byType(SearchFormSubmit), findsOneWidget);

@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:async';
import 'package:compass_app/utils/command.dart';
import 'package:compass_app/utils/result.dart';
import 'package:flutter_test/flutter_test.dart';
@ -53,10 +55,10 @@ void main() {
final future = command.execute();
// Run multiple times
command.execute();
command.execute();
command.execute();
command.execute();
unawaited(command.execute());
unawaited(command.execute());
unawaited(command.execute());
unawaited(command.execute());
// Await execution
await future;

@ -0,0 +1,19 @@
linter:
rules:
- combinators_ordering
- directives_ordering
- omit_local_variable_types
- prefer_final_fields
- prefer_final_in_for_each
- prefer_final_locals
- prefer_relative_imports
analyzer:
exclude:
- build/**
- android/**
- ios/**
- web/**
- windows/**
- macos/**
- linux/**

@ -35,5 +35,6 @@ void main(List<String> args) async {
// For running in containers, we respect the PORT environment variable.
final port = int.parse(Platform.environment['PORT'] ?? '8080');
final server = await serve(handler, ip, port);
// ignore: avoid_print
print('Server listening on port ${server.port}');
}

@ -20,5 +20,5 @@ dev_dependencies:
path: ../../analysis_defaults
test: ^1.24.0
build_runner: ^2.4.11
freezed: ^3.0.0
freezed: '>=3.0.0 <5.0.0'
json_serializable: ^6.8.0

@ -1,28 +1 @@
# 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
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
include: ../analysis_options.yaml

@ -2,12 +2,15 @@ import Flutter
import UIKit
@main
@objc class AppDelegate: FlutterAppDelegate {
@objc class AppDelegate: FlutterAppDelegate, FlutterImplicitEngineDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
func didInitializeImplicitFlutterEngine(_ engineBridge: FlutterImplicitEngineBridge) {
GeneratedPluginRegistrant.register(with: engineBridge.pluginRegistry)
}
}

@ -24,6 +24,27 @@
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<false/>
<key>UISceneConfigurations</key>
<dict>
<key>UIWindowSceneSessionRoleApplication</key>
<array>
<dict>
<key>UISceneClassName</key>
<string>UIWindowScene</string>
<key>UISceneConfigurationName</key>
<string>flutter</string>
<key>UISceneDelegateClassName</key>
<string>FlutterSceneDelegate</string>
<key>UISceneStoryboardFile</key>
<string>Main</string>
</dict>
</array>
</dict>
</dict>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>

@ -31,9 +31,9 @@ class GalleryHome extends StatelessWidget {
),
],
),
tabBuilder: (BuildContext context, int index) {
tabBuilder: (context, index) {
return CupertinoTabView(
builder: (BuildContext context) {
builder: (context) {
return switch (index) {
0 => const WidgetsPage(),
1 => SettingsPage(

@ -54,7 +54,7 @@ class _SettingsPageState extends State<SettingsPage> {
title: const Text('Dark Mode'),
trailing: CupertinoSwitch(
value: isDarkMode,
onChanged: (bool isActive) {
onChanged: (isActive) {
setState(() {
isDarkMode = isActive;
widget.onThemeChange(isActive);
@ -70,7 +70,7 @@ class _SettingsPageState extends State<SettingsPage> {
value: _textSize,
min: 0.5,
max: 1.5,
onChanged: (double value) {
onChanged: (value) {
setState(() {
_textSize = value;
});
@ -103,7 +103,7 @@ class _SettingsPageState extends State<SettingsPage> {
onTap: () {
showCupertinoDialog<void>(
context: context,
builder: (BuildContext context) => CupertinoAlertDialog(
builder: (context) => CupertinoAlertDialog(
title: const Text('Reset Settings'),
content: const Text(
'Are you sure you want to reset all settings?',

@ -13,7 +13,7 @@ class ActionSheetPage extends StatelessWidget {
onPressed: () {
showCupertinoModalPopup<void>(
context: context,
builder: (BuildContext context) => CupertinoActionSheet(
builder: (context) => CupertinoActionSheet(
title: const Text('Title'),
message: const Text('Message'),
actions: <CupertinoActionSheetAction>[

@ -13,7 +13,7 @@ class AlertDialogPage extends StatelessWidget {
onPressed: () {
showCupertinoDialog<void>(
context: context,
builder: (BuildContext context) => CupertinoAlertDialog(
builder: (context) => CupertinoAlertDialog(
title: const Text('Alert'),
content: const Text('This is a sample alert dialog.'),
actions: <CupertinoDialogAction>[

@ -17,7 +17,7 @@ class _CheckboxPageState extends State<CheckboxPage> {
child: Center(
child: CupertinoCheckbox(
value: _value,
onChanged: (bool? value) {
onChanged: (value) {
setState(() {
_value = value!;
});

@ -10,7 +10,7 @@ class DatePickerPage extends StatelessWidget {
child: Center(
child: SizedBox(
height: 200,
child: CupertinoDatePicker(onDateTimeChanged: (DateTime newDate) {}),
child: CupertinoDatePicker(onDateTimeChanged: (newDate) {}),
),
),
);

@ -12,7 +12,7 @@ class PickerPage extends StatelessWidget {
height: 200,
child: CupertinoPicker(
itemExtent: 32,
onSelectedItemChanged: (int index) {},
onSelectedItemChanged: (index) {},
children: const <Widget>[Text('One'), Text('Two'), Text('Three')],
),
),

@ -15,7 +15,7 @@ class PopupSurfacePage extends StatelessWidget {
onPressed: () {
showCupertinoModalPopup<void>(
context: context,
builder: (BuildContext context) {
builder: (context) {
return CupertinoPopupSurface(
child: Container(
color: CupertinoColors.white,

@ -17,7 +17,7 @@ class _RadioPageState extends State<RadioPage> {
child: Center(
child: RadioGroup(
groupValue: _selectedValue,
onChanged: (int? value) {
onChanged: (value) {
setState(() {
_selectedValue = value!;
});

@ -13,10 +13,10 @@ class ScrollbarPage extends StatelessWidget {
child: ListView.separated(
controller: controller,
itemCount: 100,
itemBuilder: (BuildContext context, int index) {
itemBuilder: (context, index) {
return CupertinoListTile(title: Text('Item $index'));
},
separatorBuilder: (BuildContext context, int index) {
separatorBuilder: (context, index) {
return Container(height: 1, color: CupertinoColors.opaqueSeparator);
},
),

@ -23,7 +23,7 @@ class _SegmentedControlPageState extends State<SegmentedControlPage> {
1: Text('Two'),
2: Text('Three'),
},
onValueChanged: (int val) {
onValueChanged: (val) {
setState(() {
_selectedIndex = val;
});

@ -13,20 +13,21 @@ class SheetPage extends StatelessWidget {
onPressed: () {
Navigator.of(context).push(
CupertinoSheetRoute<void>(
builder: (BuildContext context) {
return CupertinoPageScaffold(
navigationBar: CupertinoNavigationBar(
middle: const Text('Sheet'),
trailing: GestureDetector(
child: const Icon(CupertinoIcons.xmark),
onTap: () {
Navigator.of(context).pop();
},
),
),
child: const Center(child: Text('This is a sheet')),
);
},
scrollableBuilder:
(context, controller) {
return CupertinoPageScaffold(
navigationBar: CupertinoNavigationBar(
middle: const Text('Sheet'),
trailing: GestureDetector(
child: const Icon(CupertinoIcons.xmark),
onTap: () {
Navigator.of(context).pop();
},
),
),
child: const Center(child: Text('This is a sheet')),
);
},
),
);
},

@ -17,7 +17,7 @@ class _SliderPageState extends State<SliderPage> {
child: Center(
child: CupertinoSlider(
value: _value,
onChanged: (double value) {
onChanged: (value) {
setState(() {
_value = value;
});

@ -25,7 +25,7 @@ class _SlidingSegmentedControlPageState
1: Text('Two'),
2: Text('Three'),
},
onValueChanged: (int? value) {
onValueChanged: (value) {
setState(() {
_groupValue = value;
});

@ -17,7 +17,7 @@ class _SwitchPageState extends State<SwitchPage> {
child: Center(
child: CupertinoSwitch(
value: _value,
onChanged: (bool value) {
onChanged: (value) {
setState(() {
_value = value;
});

@ -11,7 +11,7 @@ class TimePickerPage extends StatelessWidget {
child: SizedBox(
height: 200,
child: CupertinoTimerPicker(
onTimerDurationChanged: (Duration newDuration) {},
onTimerDurationChanged: (newDuration) {},
),
),
),

@ -54,7 +54,7 @@ class CustomCupertinoListTile extends StatelessWidget {
onTap: () {
Navigator.of(context).push(
CupertinoPageRoute<void>(
builder: (BuildContext context) {
builder: (context) {
return WidgetDetailPage(title: title);
},
),

@ -1,28 +1,5 @@
# 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
include: ../analysis_options.yaml
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
sort_pub_dependencies: true

@ -2,12 +2,15 @@ import Flutter
import UIKit
@main
@objc class AppDelegate: FlutterAppDelegate {
@objc class AppDelegate: FlutterAppDelegate, FlutterImplicitEngineDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
func didInitializeImplicitFlutterEngine(_ engineBridge: FlutterImplicitEngineBridge) {
GeneratedPluginRegistrant.register(with: engineBridge.pluginRegistry)
}
}

@ -24,6 +24,27 @@
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<false/>
<key>UISceneConfigurations</key>
<dict>
<key>UIWindowSceneSessionRoleApplication</key>
<array>
<dict>
<key>UISceneClassName</key>
<string>UIWindowScene</string>
<key>UISceneConfigurationName</key>
<string>flutter</string>
<key>UISceneDelegateClassName</key>
<string>FlutterSceneDelegate</string>
<key>UISceneStoryboardFile</key>
<string>Main</string>
</dict>
</array>
</dict>
</dict>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save