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

pull/2868/head
Tanya Bouman 2 days 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 runs-on: ubuntu-latest
if: github.repository == 'flutter/samples' if: github.repository == 'flutter/samples'
steps: steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
- uses: actions/setup-java@1bcf9fb12cf4aa7d266a90ae39939e61372fe520 - uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6
with: with:
distribution: 'zulu' distribution: 'zulu'
java-version: '17' java-version: '17'

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

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

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

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

@ -66,7 +66,7 @@ jobs:
steps: steps:
- name: 'Checkout PR code' - 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' - name: 'Generate GitHub App Token'
id: 'generate_token' id: 'generate_token'

@ -24,11 +24,11 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
flutter_version: [stable] flutter_version: [stable, beta]
os: [ubuntu-latest, macos-latest] os: [ubuntu-latest, macos-latest]
steps: steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
- uses: actions/setup-java@1bcf9fb12cf4aa7d266a90ae39939e61372fe520 - uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6
with: with:
distribution: 'zulu' distribution: 'zulu'
java-version: '17' 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: dev_dependencies:
analysis_defaults: analysis_defaults:
path: ../../../analysis_defaults path: ../../../analysis_defaults
pigeon: ">=11.0.0 <27.0.0" pigeon: ">=11.0.0 <30.0.0"
flutter_test: flutter_test:
sdk: flutter sdk: flutter

@ -1,5 +1,4 @@
# Uncomment the next line to define a global platform for your project platform :ios, '15.0'
# platform :ios, '9.0'
flutter_application_path = '../flutter_module_books/' flutter_application_path = '../flutter_module_books/'
load File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb') 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 // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
import UIKit
import Flutter import Flutter
import UIKit
@UIApplicationMain @main
class AppDelegate: UIResponder, UIApplicationDelegate { 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 { return true
// Instantiate Flutter engine }
self.flutterEngine = FlutterEngine(name: "io.flutter", project: nil)
self.flutterEngine?.run(withEntrypoint: nil)
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> <string>1</string>
<key>LSRequiresIPhoneOS</key> <key>LSRequiresIPhoneOS</key>
<true/> <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> <key>UILaunchStoryboardName</key>
<string>LaunchScreen</string> <string>LaunchScreen</string>
<key>UIMainStoryboardFile</key> <key>UIMainStoryboardFile</key>

@ -20,6 +20,27 @@
<string>1</string> <string>1</string>
<key>LSRequiresIPhoneOS</key> <key>LSRequiresIPhoneOS</key>
<true/> <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> <key>UILaunchStoryboardName</key>
<string>LaunchScreen</string> <string>LaunchScreen</string>
<key>UIMainStoryboardFile</key> <key>UIMainStoryboardFile</key>

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

@ -5,48 +5,8 @@
// Created by Louise Hsu on 12/3/25. // Created by Louise Hsu on 12/3/25.
// //
import Flutter
import UIKit import UIKit
class SceneDelegate: UIResponder, UIWindowSceneDelegate { class SceneDelegate: FlutterSceneDelegate {
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.
}
} }

@ -2,31 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
import Flutter
import UIKit import UIKit
/// The UIWindowSceneDelegate for the app. /// The UIWindowSceneDelegate for the app.
class SceneDelegate: UIResponder, UIWindowSceneDelegate { class SceneDelegate: FlutterSceneDelegate {
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) {
}
} }

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

@ -1,3 +1,5 @@
platform :ios, '15.0'
# Copyright 2021 The Flutter team. All rights reserved. # Copyright 2021 The Flutter team. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # 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 // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
import UIKit
import Flutter import Flutter
import FlutterPluginRegistrant import FlutterPluginRegistrant
import UIKit
@UIApplicationMain @main
class AppDelegate: UIResponder, UIApplicationDelegate { class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow? var flutterEngine: FlutterEngine?
var flutterEngine : FlutterEngine? func application(
_ application: UIApplication,
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
// Instantiate Flutter engine ) -> Bool {
self.flutterEngine = FlutterEngine(name: "io.flutter", project: nil) // Instantiate Flutter engine
self.flutterEngine?.run(withEntrypoint: nil) self.flutterEngine = FlutterEngine(name: "io.flutter", project: nil)
GeneratedPluginRegistrant.register(with: self.flutterEngine!) 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> <string>1</string>
<key>LSRequiresIPhoneOS</key> <key>LSRequiresIPhoneOS</key>
<true/> <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> <key>UILaunchStoryboardName</key>
<string>LaunchScreen</string> <string>LaunchScreen</string>
<key>UIMainStoryboardFile</key> <key>UIMainStoryboardFile</key>

@ -20,6 +20,27 @@
<string>1</string> <string>1</string>
<key>LSRequiresIPhoneOS</key> <key>LSRequiresIPhoneOS</key>
<true/> <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> <key>UILaunchStoryboardName</key>
<string>LaunchScreen</string> <string>LaunchScreen</string>
<key>UIMainStoryboardFile</key> <key>UIMainStoryboardFile</key>

@ -1,5 +1,4 @@
# Uncomment the next line to define a global platform for your project platform :ios, '15.0'
# platform :ios, '9.0'
flutter_application_path = '../flutter_module_using_plugin' flutter_application_path = '../flutter_module_using_plugin'
load File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb') 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 // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
import UIKit
import Flutter import Flutter
import UIKit
@UIApplicationMain @main
class AppDelegate: UIResponder, UIApplicationDelegate { 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 { return true
// Instantiate Flutter engine }
self.flutterEngine = FlutterEngine(name: "io.flutter", project: nil)
self.flutterEngine?.run(withEntrypoint: nil)
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> <string>1</string>
<key>LSRequiresIPhoneOS</key> <key>LSRequiresIPhoneOS</key>
<true/> <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> <key>UILaunchStoryboardName</key>
<string>LaunchScreen</string> <string>LaunchScreen</string>
<key>UIMainStoryboardFile</key> <key>UIMainStoryboardFile</key>

@ -20,6 +20,27 @@
<string>1</string> <string>1</string>
<key>LSRequiresIPhoneOS</key> <key>LSRequiresIPhoneOS</key>
<true/> <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> <key>UILaunchStoryboardName</key>
<string>LaunchScreen</string> <string>LaunchScreen</string>
<key>UIMainStoryboardFile</key> <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 Flutter
import UIKit
@UIApplicationMain @main
@objc class AppDelegate: FlutterAppDelegate { @objc class AppDelegate: FlutterAppDelegate, FlutterImplicitEngineDelegate {
override func application( override func application(
_ application: UIApplication, _ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool { ) -> Bool {
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions) return super.application(application, didFinishLaunchingWithOptions: launchOptions)
} }
func didInitializeImplicitFlutterEngine(_ engineBridge: FlutterImplicitEngineBridge) {
GeneratedPluginRegistrant.register(with: engineBridge.pluginRegistry)
}
} }

@ -24,6 +24,27 @@
<string>$(FLUTTER_BUILD_NUMBER)</string> <string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key> <key>LSRequiresIPhoneOS</key>
<true/> <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> <key>UILaunchStoryboardName</key>
<string>LaunchScreen</string> <string>LaunchScreen</string>
<key>UIMainStoryboardFile</key> <key>UIMainStoryboardFile</key>

@ -1,30 +1,10 @@
# This file configures the static analysis results for your project (errors, analyzer:
# warnings, and lints). exclude:
# - build/**
# This enables the 'recommended' set of lints from `package:lints`. - android/**
# This set helps identify many issues that may lead to problems when running - ios/**
# or consuming Dart code, and enforces writing Dart using a single, idiomatic - web/**
# style and format. - windows/**
# - macos/**
# If you want a smaller set of lints you can change this to specify - linux/**
# 'package:lints/core.yaml'. These are just the most critical lints include: ../../analysis_options.yaml
# (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

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

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

@ -24,6 +24,27 @@
<string>$(FLUTTER_BUILD_NUMBER)</string> <string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key> <key>LSRequiresIPhoneOS</key>
<true/> <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> <key>UILaunchStoryboardName</key>
<string>LaunchScreen</string> <string>LaunchScreen</string>
<key>UIMainStoryboardFile</key> <key>UIMainStoryboardFile</key>

@ -1,8 +1,8 @@
import 'package:flutter_test/flutter_test.dart';
import 'package:asset_transformation/main.dart'; import 'package:asset_transformation/main.dart';
import 'package:flutter_test/flutter_test.dart';
void main() { void main() {
testWidgets('app can render without exceptions', (WidgetTester tester) async { testWidgets('app can render without exceptions', (tester) async {
await tester.pumpWidget(const MainApp()); 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: linter:
rules: rules:
- combinators_ordering - combinators_ordering
@ -9,3 +7,14 @@ linter:
- prefer_final_in_for_each - prefer_final_in_for_each
- prefer_final_locals - prefer_final_locals
- prefer_relative_imports - prefer_relative_imports
analyzer:
exclude:
- build/**
- android/**
- ios/**
- web/**
- windows/**
- macos/**
- linux/**

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

@ -24,6 +24,27 @@
<string>$(FLUTTER_BUILD_NUMBER)</string> <string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key> <key>LSRequiresIPhoneOS</key>
<true/> <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> <key>UILaunchStoryboardName</key>
<string>LaunchScreen</string> <string>LaunchScreen</string>
<key>UIMainStoryboardFile</key> <key>UIMainStoryboardFile</key>

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

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

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

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

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

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

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

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

@ -45,14 +45,14 @@ void main() {
); );
} }
testWidgets('should load screen', (WidgetTester tester) async { testWidgets('should load screen', (tester) async {
await mockNetworkImages(() async { await mockNetworkImages(() async {
await loadScreen(tester); await loadScreen(tester);
expect(find.byType(ActivitiesScreen), findsOneWidget); expect(find.byType(ActivitiesScreen), findsOneWidget);
}); });
}); });
testWidgets('should list activity', (WidgetTester tester) async { testWidgets('should list activity', (tester) async {
await mockNetworkImages(() async { await mockNetworkImages(() async {
await loadScreen(tester); await loadScreen(tester);
expect(find.byType(ActivityEntry), findsOneWidget); expect(find.byType(ActivityEntry), findsOneWidget);
@ -60,9 +60,7 @@ void main() {
}); });
}); });
testWidgets('should select activity and confirm', ( testWidgets('should select activity and confirm', (tester) async {
WidgetTester tester,
) async {
await mockNetworkImages(() async { await mockNetworkImages(() async {
await loadScreen(tester); await loadScreen(tester);
// Select one activity // 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 mockNetworkImages(() async {
await loadScreen(tester); await loadScreen(tester);
expect(find.byType(LoginScreen), findsOneWidget); expect(find.byType(LoginScreen), findsOneWidget);
}); });
}); });
testWidgets('should perform login', (WidgetTester tester) async { testWidgets('should perform login', (tester) async {
await mockNetworkImages(() async { await mockNetworkImages(() async {
await loadScreen(tester); 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 mockNetworkImages(() async {
await loadScreen(tester); await loadScreen(tester);
expect(find.byType(LogoutButton), findsOneWidget); expect(find.byType(LogoutButton), findsOneWidget);
}); });
}); });
testWidgets('should perform logout', (WidgetTester tester) async { testWidgets('should perform logout', (tester) async {
await mockNetworkImages(() async { await mockNetworkImages(() async {
await loadScreen(tester); await loadScreen(tester);

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

@ -43,10 +43,7 @@ void main() {
Future<void> loadWidget(WidgetTester tester) async { Future<void> loadWidget(WidgetTester tester) async {
await testApp( await testApp(
tester, tester,
HomeScreen( HomeScreen(viewModel: viewModel, logoutViewModel: logoutViewModel),
viewModel: viewModel,
logoutViewModel: logoutViewModel,
),
goRouter: goRouter, 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 mockNetworkImages(() async {
await loadScreen(tester); await loadScreen(tester);
expect(find.byType(ResultsScreen), findsOneWidget); expect(find.byType(ResultsScreen), findsOneWidget);
}); });
}); });
testWidgets('should display destination', (WidgetTester tester) async { testWidgets('should display destination', (tester) async {
await mockNetworkImages(() async { await mockNetworkImages(() async {
await loadScreen(tester); await loadScreen(tester);
@ -62,9 +62,7 @@ void main() {
}); });
}); });
testWidgets('should tap and navigate to activities', ( testWidgets('should tap and navigate to activities', (tester) async {
WidgetTester tester,
) async {
await mockNetworkImages(() async { await mockNetworkImages(() async {
await loadScreen(tester); await loadScreen(tester);

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

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

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

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

@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
import 'dart:async';
import 'package:compass_app/utils/command.dart'; import 'package:compass_app/utils/command.dart';
import 'package:compass_app/utils/result.dart'; import 'package:compass_app/utils/result.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
@ -53,10 +55,10 @@ void main() {
final future = command.execute(); final future = command.execute();
// Run multiple times // Run multiple times
command.execute(); unawaited(command.execute());
command.execute(); unawaited(command.execute());
command.execute(); unawaited(command.execute());
command.execute(); unawaited(command.execute());
// Await execution // Await execution
await future; 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. // For running in containers, we respect the PORT environment variable.
final port = int.parse(Platform.environment['PORT'] ?? '8080'); final port = int.parse(Platform.environment['PORT'] ?? '8080');
final server = await serve(handler, ip, port); final server = await serve(handler, ip, port);
// ignore: avoid_print
print('Server listening on port ${server.port}'); print('Server listening on port ${server.port}');
} }

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

@ -1,28 +1 @@
# This file configures the analyzer, which statically analyzes Dart code to include: ../analysis_options.yaml
# 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

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

@ -24,6 +24,27 @@
<string>$(FLUTTER_BUILD_NUMBER)</string> <string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key> <key>LSRequiresIPhoneOS</key>
<true/> <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> <key>UILaunchStoryboardName</key>
<string>LaunchScreen</string> <string>LaunchScreen</string>
<key>UIMainStoryboardFile</key> <key>UIMainStoryboardFile</key>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -1,28 +1,5 @@
# This file configures the analyzer, which statically analyzes Dart code to include: ../analysis_options.yaml
# 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: 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: rules:
# avoid_print: false # Uncomment to disable the `avoid_print` rule sort_pub_dependencies: true
# 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,12 +2,15 @@ import Flutter
import UIKit import UIKit
@main @main
@objc class AppDelegate: FlutterAppDelegate { @objc class AppDelegate: FlutterAppDelegate, FlutterImplicitEngineDelegate {
override func application( override func application(
_ application: UIApplication, _ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool { ) -> Bool {
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions) return super.application(application, didFinishLaunchingWithOptions: launchOptions)
} }
func didInitializeImplicitFlutterEngine(_ engineBridge: FlutterImplicitEngineBridge) {
GeneratedPluginRegistrant.register(with: engineBridge.pluginRegistry)
}
} }

@ -24,6 +24,27 @@
<string>$(FLUTTER_BUILD_NUMBER)</string> <string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key> <key>LSRequiresIPhoneOS</key>
<true/> <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> <key>UILaunchStoryboardName</key>
<string>LaunchScreen</string> <string>LaunchScreen</string>
<key>UIMainStoryboardFile</key> <key>UIMainStoryboardFile</key>

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

Loading…
Cancel
Save