adding packages
@@ -10,3 +10,13 @@ build/
|
|||||||
*.iml
|
*.iml
|
||||||
|
|
||||||
DerivedData/
|
DerivedData/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Files and directories created by pub
|
||||||
|
.dart_tool/
|
||||||
|
.packages
|
||||||
|
.pub/
|
||||||
|
build/
|
||||||
|
|
||||||
|
*.SF2
|
||||||
|
|||||||
@@ -6,15 +6,118 @@ A collection of Flutter packages maintained by @rodydavis.
|
|||||||
|
|
||||||
| Package | Description | Version |
|
| Package | Description | Version |
|
||||||
| :--- | :--- | :--- |
|
| :--- | :--- | :--- |
|
||||||
|
| [animations_example](https://github.com/rodydavis/signals.dart/tree/main/examples/animations_example) | A new Flutter project. |  |
|
||||||
| [app_review](./packages/app_review) | Request and Write Reviews and Open Store Listing for Android and iOS/MacOS in Flutter. | [](https://pub.dartlang.org/packages/app_review) |
|
| [app_review](./packages/app_review) | Request and Write Reviews and Open Store Listing for Android and iOS/MacOS in Flutter. | [](https://pub.dartlang.org/packages/app_review) |
|
||||||
|
| [app_review_example](./packages/app_review/example) | Demonstrates how to use the app_review plugin. |  |
|
||||||
|
| [auth_flow](https://github.com/rodydavis/signals.dart/tree/main/examples/auth_flow) | Example with a user signal and authenticated flow |  |
|
||||||
| [breakpoint](./packages/breakpoint) | A Flutter plugin to calculate the material design breakpoints. | [](https://pub.dartlang.org/packages/breakpoint) |
|
| [breakpoint](./packages/breakpoint) | A Flutter plugin to calculate the material design breakpoints. | [](https://pub.dartlang.org/packages/breakpoint) |
|
||||||
|
| [clean_architecture](https://github.com/rodydavis/signals.dart/tree/main/examples/clean_architecture) | Todo example using domain driven architecture |  |
|
||||||
|
| [crud_dio](https://github.com/rodydavis/signals.dart/tree/main/examples/crud_dio) | A new Flutter project. |  |
|
||||||
|
| [dart_mappable_example](https://github.com/rodydavis/signals.dart/tree/main/examples/dart_mappable_example) | A new Flutter package project. |  |
|
||||||
|
| [drift_example](https://github.com/rodydavis/signals.dart/tree/main/examples/drift_example) | SQLite via drift and signals |  |
|
||||||
|
| [eval_calculator](https://github.com/rodydavis/signals.dart/tree/main/examples/eval_calculator) | Calculator that is driven by dynamic signals at runtime |  |
|
||||||
|
| [example](https://github.com/rodydavis/signals.dart/tree/main/packages/signals_lint/example) | A new Flutter project. |  |
|
||||||
|
| [example](./packages/breakpoint/example) | A new Flutter project. |  |
|
||||||
|
| [example](https://github.com/rodydavis/signals.dart/tree/main/packages/signals_hooks/example) | A new Flutter project. |  |
|
||||||
|
| [example](https://github.com/rodydavis/signals.dart/tree/main/packages/signals/example) | Example signals project |  |
|
||||||
|
| [example](https://github.com/rodydavis/signals.dart/tree/main/packages/signals_flutter/example) | A new Flutter project. |  |
|
||||||
|
| [flutter_async](https://github.com/rodydavis/signals.dart/tree/main/examples/flutter_async) | Examples that rely on Async/Future/Stream signals |  |
|
||||||
|
| [flutter_colorband](https://github.com/rodydavis/signals.dart/tree/main/examples/flutter_colorband) | Generative color examples |  |
|
||||||
| [flutter_sms](./packages/flutter_sms) | A Flutter plugin to send SMS and MMS on iOS and Android. | [](https://pub.dartlang.org/packages/flutter_sms) |
|
| [flutter_sms](./packages/flutter_sms) | A Flutter plugin to send SMS and MMS on iOS and Android. | [](https://pub.dartlang.org/packages/flutter_sms) |
|
||||||
| [flutter_vibrate](./packages/flutter_vibrate) | A Haptic Feedback and Vibration plugin. | [](https://pub.dartlang.org/packages/flutter_vibrate) |
|
| [flutter_vibrate](./packages/flutter_vibrate) | A Haptic Feedback and Vibration plugin. | [](https://pub.dartlang.org/packages/flutter_vibrate) |
|
||||||
| [flutter_whatsnew](./packages/flutter_whatsnew) | A new Flutter package to show updates to users. | [](https://pub.dartlang.org/packages/flutter_whatsnew) |
|
| [flutter_whatsnew](./packages/flutter_whatsnew) | A new Flutter package to show updates to users. | [](https://pub.dartlang.org/packages/flutter_whatsnew) |
|
||||||
|
| [get_it_signals_example](https://github.com/rodydavis/signals.dart/tree/main/examples/get_it_signals) | get_it + signals |  |
|
||||||
|
| [html_canvas](https://github.com/rodydavis/signals.dart/tree/main/examples/html_canvas) | Signals and the canvas |  |
|
||||||
|
| [html_todo_app](https://github.com/rodydavis/signals.dart/tree/main/examples/html_todo_app) | Todo HTML web app with signals |  |
|
||||||
|
| [infinite_scroll](https://github.com/rodydavis/signals.dart/tree/main/examples/infinite_scroll) | A new Flutter project. |  |
|
||||||
|
| [node_based_editor](https://github.com/rodydavis/signals.dart/tree/main/examples/node_based_editor) | Node based editor built with signals |  |
|
||||||
| [open_xml](https://github.com/rodydavis/open_xml) | Open XML (OOXML) formatted documents. | [](https://pub.dartlang.org/packages/open_xml) |
|
| [open_xml](https://github.com/rodydavis/open_xml) | Open XML (OOXML) formatted documents. | [](https://pub.dartlang.org/packages/open_xml) |
|
||||||
|
| [persist_shared_preferences](https://github.com/rodydavis/signals.dart/tree/main/examples/persist_shared_preferences) | A new Flutter project. |  |
|
||||||
| [preact_signals](https://github.com/rodydavis/signals.dart/tree/main/packages/preact_signals) | Dart port of Preact.js Signals | [](https://pub.dartlang.org/packages/preact_signals) |
|
| [preact_signals](https://github.com/rodydavis/signals.dart/tree/main/packages/preact_signals) | Dart port of Preact.js Signals | [](https://pub.dartlang.org/packages/preact_signals) |
|
||||||
|
| [rxdart_example](https://github.com/rodydavis/signals.dart/tree/main/examples/rxdart) | RxDart + signals |  |
|
||||||
|
| [shopping_cart](https://github.com/rodydavis/signals.dart/tree/main/examples/shopping_cart) | Shopping cart example |  |
|
||||||
| [signals](https://github.com/rodydavis/signals.dart/tree/main/packages/signals) | Reactivity made simple. Do more by doing less. Supports Flutter and any Dart project including HTML/JS, CLI, Shelf Server, VM and more. | [](https://pub.dartlang.org/packages/signals) |
|
| [signals](https://github.com/rodydavis/signals.dart/tree/main/packages/signals) | Reactivity made simple. Do more by doing less. Supports Flutter and any Dart project including HTML/JS, CLI, Shelf Server, VM and more. | [](https://pub.dartlang.org/packages/signals) |
|
||||||
| [signals_core](https://github.com/rodydavis/signals.dart/tree/main/packages/signals_core) | The signals library exposes four core functions which are the building blocks to model any business logic you can think of. | [](https://pub.dartlang.org/packages/signals_core) |
|
| [signals_core](https://github.com/rodydavis/signals.dart/tree/main/packages/signals_core) | The signals library exposes four core functions which are the building blocks to model any business logic you can think of. | [](https://pub.dartlang.org/packages/signals_core) |
|
||||||
|
| [signals_dart_examples](https://github.com/rodydavis/signals.dart/tree/main/examples/dart_examples) | Pure dart examples using signals |  |
|
||||||
|
| [signals_devtools_extension](https://github.com/rodydavis/signals.dart/tree/main/packages/signals_devtools_extension) | Signals DevTools extension. |  |
|
||||||
| [signals_flutter](https://github.com/rodydavis/signals.dart/tree/main/packages/signals_flutter) | The signals library exposes four core functions which are the building blocks to model any business logic you can think of. | [](https://pub.dartlang.org/packages/signals_flutter) |
|
| [signals_flutter](https://github.com/rodydavis/signals.dart/tree/main/packages/signals_flutter) | The signals library exposes four core functions which are the building blocks to model any business logic you can think of. | [](https://pub.dartlang.org/packages/signals_flutter) |
|
||||||
| [signals_hooks](https://github.com/rodydavis/signals.dart/tree/main/packages/signals_hooks) | flutter_hooks bindings for signals | [](https://pub.dartlang.org/packages/signals_hooks) |
|
| [signals_hooks](https://github.com/rodydavis/signals.dart/tree/main/packages/signals_hooks) | flutter_hooks bindings for signals | [](https://pub.dartlang.org/packages/signals_hooks) |
|
||||||
| [signals_lint](https://github.com/rodydavis/signals.dart/tree/main/packages/signals_lint) | linter and developer tool for signals | [](https://pub.dartlang.org/packages/signals_lint) |
|
| [signals_lint](https://github.com/rodydavis/signals.dart/tree/main/packages/signals_lint) | linter and developer tool for signals | [](https://pub.dartlang.org/packages/signals_lint) |
|
||||||
|
| [signals_mvi_example](https://github.com/rodydavis/signals.dart/tree/main/examples/mvi_example) | A new Flutter project. |  |
|
||||||
|
| [vibrate_example](./packages/flutter_vibrate/example) | Demonstrates how to use the vibrate plugin. |  |
|
||||||
|
|
||||||
|
## Experimental
|
||||||
|
|
||||||
|
| Package | Description | Version |
|
||||||
|
| :--- | :--- | :--- |
|
||||||
|
| [diff_algorithims](./experimental/diff_algorithims) | A set of diffing algorithims for Dart |  |
|
||||||
|
| [example](./experimental/web_file_system/example) | Demo for web_file_system |  |
|
||||||
|
| [example](./experimental/pocketbase_auth/example) | A new Flutter project. | [](https://pub.dartlang.org/packages/example) |
|
||||||
|
| [example](./experimental/pocketbase_sync/example) | A new Flutter project. | [](https://pub.dartlang.org/packages/example) |
|
||||||
|
| [pocketbase_auth](./experimental/pocketbase_auth) | Pocketbase auth client with built in UI screens and token refresh |  |
|
||||||
|
| [pocketbase_sync](./experimental/pocketbase_sync) | A Flutter package for offline-first syncing with PocketBase. |  |
|
||||||
|
| [web_file_system](./experimental/web_file_system) | A high-performance, asynchronous file system for the web using IDB and OPFS. |  |
|
||||||
|
|
||||||
|
## Deprecated
|
||||||
|
|
||||||
|
| Package | Description | Version |
|
||||||
|
| :--- | :--- | :--- |
|
||||||
|
| [app_review](./deprecated/app_review) | Request and Write Reviews and Open Store Listing for Android and iOS in Flutter. | [](https://pub.dartlang.org/packages/app_review) |
|
||||||
|
| [cupertino_controllers](./deprecated/cupertino_controllers) | A Flutter plugin with Cupertino Controller Examples. This includes a Table View Controller, Master Detail Controller, Cupertino Cell with Xcode Storyboard templates (basic detail, subtitle...), and detail examples | [](https://pub.dartlang.org/packages/cupertino_controllers) |
|
||||||
|
| [dart_firebase](./deprecated/dart_firebase) | Access Firebase Firestore from a REST API | [](https://pub.dartlang.org/packages/dart_firebase) |
|
||||||
|
| [data_tables](./deprecated/data_tables) | ListView on Mobile and Stateless Data Tables on Tablets and Desktops. | [](https://pub.dartlang.org/packages/data_tables) |
|
||||||
|
| [dynamic_tabs](./deprecated/dynamic_tabs) | A Flutter plugin for letting the user edit the bottom tabs like the | [](https://pub.dartlang.org/packages/dynamic_tabs) |
|
||||||
|
| [easy_google_maps](./deprecated/easy_google_maps) | Easy google maps plugin | [](https://pub.dartlang.org/packages/easy_google_maps) |
|
||||||
|
| [easy_web_view](./deprecated/easy_web_view) | A super simple webview for Flutter Web, Mobile and Desktop | [](https://pub.dartlang.org/packages/easy_web_view) |
|
||||||
|
| [example](./deprecated/file_access/example) | A new Flutter project. | [](https://pub.dartlang.org/packages/example) |
|
||||||
|
| [example](./deprecated/settings_manager/example) | An example of using the Settings Manager | [](https://pub.dartlang.org/packages/example) |
|
||||||
|
| [example](./deprecated/dart_firebase/example) | A new Flutter project. |  |
|
||||||
|
| [example](./deprecated/golden_layout/example) | A new Flutter project. |  |
|
||||||
|
| [example](./deprecated/easy_web_view/example) | A new Flutter project. |  |
|
||||||
|
| [example](./deprecated/navigation_rail/example) | A new Flutter project. | [](https://pub.dartlang.org/packages/example) |
|
||||||
|
| [example](./deprecated/native_color_picker/example) | A new Flutter project. |  |
|
||||||
|
| [example](./deprecated/flutter_multi_window/example) | A new Flutter project. | [](https://pub.dartlang.org/packages/example) |
|
||||||
|
| [example](./deprecated/features/example) | A new Flutter project. |  |
|
||||||
|
| [example](./deprecated/image_resizer/example) | A new Flutter project. | [](https://pub.dartlang.org/packages/example) |
|
||||||
|
| [example](./deprecated/flutter_dynamic_widget/example) | A new Flutter project. |  |
|
||||||
|
| [example](./deprecated/flutter_wasm_interop/example) | A new Flutter project. | [](https://pub.dartlang.org/packages/example) |
|
||||||
|
| [example](./deprecated/flutter_data_view/example) | A new Flutter project. |  |
|
||||||
|
| [fb_auth](./deprecated/fb_auth) | A Web, Mobile Firebase Auth Plugin | [](https://pub.dartlang.org/packages/fb_auth) |
|
||||||
|
| [fb_auth_example](./deprecated/fb_auth/example) | Demonstrates how to use the fb_auth plugin. |  |
|
||||||
|
| [fb_firestore](./deprecated/fb_firestore) | A Flutter project to use Firebase Cloud Firestore on Mobile and Web | [](https://pub.dartlang.org/packages/fb_firestore) |
|
||||||
|
| [fb_storage](./deprecated/fb_storage) | Firebase Storage on Web and Mobile | [](https://pub.dartlang.org/packages/fb_storage) |
|
||||||
|
| [features](./deprecated/features) | A Flutter package to help manage features enabled/disabled for a user | [](https://pub.dartlang.org/packages/features) |
|
||||||
|
| [file_access](./deprecated/file_access) | A Flutter package to handel files on Web, Desktop and Mobile instead of File.io | [](https://pub.dartlang.org/packages/file_access) |
|
||||||
|
| [floating_search_bar](./deprecated/floating_search_bar) | A Search App Bar like the one in Gmail and Google Photos. | [](https://pub.dartlang.org/packages/floating_search_bar) |
|
||||||
|
| [flutter_ast](./deprecated/flutter_ast) | A Pure Dart File to Ast Serializer/Deserializer. |  |
|
||||||
|
| [flutter_data_view](./deprecated/flutter_data_view) | A Flutter package to simplify creating data views with the same backing data source. | [](https://pub.dartlang.org/packages/flutter_data_view) |
|
||||||
|
| [flutter_dynamic_widget](./deprecated/flutter_dynamic_widget) | A Dynamic Widget Runtime from Json to Flutter Widgets based on the | [](https://pub.dartlang.org/packages/flutter_dynamic_widget) |
|
||||||
|
| [flutter_midi](./deprecated/flutter_midi) | A FLutter Plugin to Play midi on iOS and Android. | [](https://pub.dartlang.org/packages/flutter_midi) |
|
||||||
|
| [flutter_multi_window](./deprecated/flutter_multi_window) | A Flutter package to create new windows on supported platforms. | [](https://pub.dartlang.org/packages/flutter_multi_window) |
|
||||||
|
| [flutter_project_gen](./deprecated/project_gen) | A new Flutter package project. | [](https://pub.dartlang.org/packages/flutter_project_gen) |
|
||||||
|
| [flutter_sms](./deprecated/flutter_sms) | A Flutter plugin to Send SMS and MMS on iOS and Android. If iMessage is enabled it will send as iMessage on iOS. This plugin must be tested on a real device on iOS. | [](https://pub.dartlang.org/packages/flutter_sms) |
|
||||||
|
| [flutter_sms_example](./deprecated/flutter_sms/example) | Demonstrates how to use the flutter_sms plugin. | [](https://pub.dartlang.org/packages/flutter_sms_example) |
|
||||||
|
| [flutter_storyboard](./deprecated/storyboard) | A Flutter package to show a storyboard of all your widgets. | [](https://pub.dartlang.org/packages/flutter_storyboard) |
|
||||||
|
| [flutter_vibrate](./deprecated/flutter_vibrate) | A Haptic Feedback plugin. | [](https://pub.dartlang.org/packages/flutter_vibrate) |
|
||||||
|
| [flutter_wasm_interop](./deprecated/flutter_wasm_interop) | A Flutter + WebAssembly Interop. | [](https://pub.dartlang.org/packages/flutter_wasm_interop) |
|
||||||
|
| [flutter_whatsnew](./deprecated/flutter_whatsnew) | A new Flutter package to show updates to users. | [](https://pub.dartlang.org/packages/flutter_whatsnew) |
|
||||||
|
| [get_version](./deprecated/get_version) | Get the Version Name, Version Code, Platform and OS Version, and App ID on iOS and Android. | [](https://pub.dartlang.org/packages/get_version) |
|
||||||
|
| [golden_layout](./deprecated/golden_layout) | A internal window library for Flutter based on http://golden-layout.com/ | [](https://pub.dartlang.org/packages/golden_layout) |
|
||||||
|
| [image_resizer](./deprecated/image_resizer) | A crossplatform general image resizer based on flutter_launcher_icons | [](https://pub.dartlang.org/packages/image_resizer) |
|
||||||
|
| [mobile_popup](./deprecated/mobile_popup) | A Flutter plugin to show a PopUp Surface on Tablet / Desktop and for Mobile a Full Screen View. | [](https://pub.dartlang.org/packages/mobile_popup) |
|
||||||
|
| [mobile_sidebar](./deprecated/mobile_sidebar) | A Responsive Sidebar for Flutter that follows Material Design | [](https://pub.dartlang.org/packages/mobile_sidebar) |
|
||||||
|
| [native_color_picker](./deprecated/native_color_picker) | Picking a color natively on each platform. | [](https://pub.dartlang.org/packages/native_color_picker) |
|
||||||
|
| [navigation_rail](./deprecated/navigation_rail) | A Navigation Rail for Flutter | [](https://pub.dartlang.org/packages/navigation_rail) |
|
||||||
|
| [ngflutter](./deprecated/flutter_cli) | Scaffolding tool for Flutter | [](https://pub.dartlang.org/packages/ngflutter) |
|
||||||
|
| [responsive_scaffold](./deprecated/responsive_scaffold) | On mobile it shows a list and pushes to details and on tablet it shows the List and the selected item. | [](https://pub.dartlang.org/packages/responsive_scaffold) |
|
||||||
|
| [scaffold_tab_bar](./deprecated/scaffold_tab_bar) | A package to make it really easy to have optional nested navigation per tab. | [](https://pub.dartlang.org/packages/scaffold_tab_bar) |
|
||||||
|
| [scaffold_tab_bar_example](./deprecated/scaffold_tab_bar/example) | Demonstrates how to use the scaffold_tab_bar plugin. |  |
|
||||||
|
| [settings_gen](./deprecated/settings_manager/packages/settings_gen) | Code generator for MobX that adds support for annotating your code with @observable, @computed, @action and also creating SettingsStore classes. | [](https://pub.dartlang.org/packages/settings_gen) |
|
||||||
|
| [settings_manager](./deprecated/settings_manager/packages/settings_manager) | A settings manager built on top of SharedPreferences. | [](https://pub.dartlang.org/packages/settings_manager) |
|
||||||
|
| [sheet_music](./deprecated/sheet_music) | A Flutter Widget for Sheet Music (All Major Flat and Sharp Scales, Notes from 5 below and 5 above the bar, Treble and Bass Clef). | [](https://pub.dartlang.org/packages/sheet_music) |
|
||||||
|
| [storyboards](./deprecated/storyboard/example) | A new Flutter project. |  |
|
||||||
|
| [undo](./deprecated/undo) | A Undo/Redo Library for Flutter | [](https://pub.dartlang.org/packages/undo) |
|
||||||
|
| [undo_example](./deprecated/undo/example) | Demonstrates how to use the undo plugin. |  |
|
||||||
|
| [vibrate_example](./deprecated/flutter_vibrate/example) | Demonstrates how to use the vibrate plugin. |  |
|
||||||
|
| [widget_gen](./deprecated/widget_gen) | A Flutter Code Gen Package Used to Generate Widgets for WidgetStudio | [](https://pub.dartlang.org/packages/widget_gen) |
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
# Auto detect text files and perform LF normalization
|
||||||
|
* text=auto
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
name: github pages
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: ubuntu-18.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Setup Flutter
|
||||||
|
uses: subosito/flutter-action@v1
|
||||||
|
with:
|
||||||
|
channel: 'stable'
|
||||||
|
|
||||||
|
- name: Install
|
||||||
|
run: flutter pub get
|
||||||
|
- name: Build
|
||||||
|
run: cd example && flutter build web
|
||||||
|
|
||||||
|
- name: Deploy
|
||||||
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
# personal_token: ${{ secrets.PERSONAL_TOKEN }}
|
||||||
|
# deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
|
||||||
|
publish_dir: ./example/build/web
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
.DS_Store
|
||||||
|
.dart_tool/
|
||||||
|
|
||||||
|
.packages
|
||||||
|
.pub/
|
||||||
|
|
||||||
|
build/
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# This file tracks properties of this Flutter project.
|
||||||
|
# Used by Flutter tool to assess capabilities and perform upgrades etc.
|
||||||
|
#
|
||||||
|
# This file should be version controlled and should not be manually edited.
|
||||||
|
|
||||||
|
version:
|
||||||
|
revision: 77512a3c46ec447cc64bac959e3043c2f0bdd446
|
||||||
|
channel: master
|
||||||
|
|
||||||
|
project_type: plugin
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
## 1.1.0
|
||||||
|
|
||||||
|
* Stable Version
|
||||||
|
|
||||||
|
## 1.0.2-nullsafety
|
||||||
|
|
||||||
|
* Controller updates
|
||||||
|
* Merge from master
|
||||||
|
|
||||||
|
## 1.0.1-nullsafety
|
||||||
|
|
||||||
|
* Added Online Demo
|
||||||
|
|
||||||
|
## 1.0.0-nullsafety
|
||||||
|
|
||||||
|
* Null Safety
|
||||||
|
|
||||||
|
## 0.1.0 - 04.06.2019
|
||||||
|
|
||||||
|
* Updating Example for Desktop
|
||||||
|
|
||||||
|
## 0.0.3
|
||||||
|
|
||||||
|
* Now Just Pure Dart
|
||||||
|
|
||||||
|
## 0.0.2
|
||||||
|
|
||||||
|
* Added Master Detail Controller
|
||||||
|
* Added Table View Controller
|
||||||
|
* Updated Example
|
||||||
|
|
||||||
|
## 0.0.1
|
||||||
|
|
||||||
|
* TODO: Describe initial release.
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2020 Rody Davis
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
[](https://www.buymeacoffee.com/rodydavis)
|
||||||
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=WSH3GVC49GNNJ)
|
||||||
|

|
||||||
|
[](https://github.com/rodydavis/cupertino_controllers)
|
||||||
|
[](https://pub.dev/packages/cupertino_controllers)
|
||||||
|
|
||||||
|
# cupertino_controllers
|
||||||
|
|
||||||
|
A Flutter plugin with Cupertino Controller Examples
|
||||||
|
|
||||||
|
Online demo [here](https://rodydavis.github.io/cupertino_controllers/)
|
||||||
|
|
||||||
|
## Getting Started
|
||||||
|
|
||||||
|
See Example for Documentation
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Completed:
|
||||||
|
- Master Detail Controller
|
||||||
|
- Table View Controller
|
||||||
|
After Width: | Height: | Size: 4.2 MiB |
@@ -0,0 +1,70 @@
|
|||||||
|
# Miscellaneous
|
||||||
|
*.class
|
||||||
|
*.log
|
||||||
|
*.pyc
|
||||||
|
*.swp
|
||||||
|
.DS_Store
|
||||||
|
.atom/
|
||||||
|
.buildlog/
|
||||||
|
.history
|
||||||
|
.svn/
|
||||||
|
|
||||||
|
# IntelliJ related
|
||||||
|
*.iml
|
||||||
|
*.ipr
|
||||||
|
*.iws
|
||||||
|
.idea/
|
||||||
|
|
||||||
|
# Visual Studio Code related
|
||||||
|
.vscode/
|
||||||
|
|
||||||
|
# Flutter/Dart/Pub related
|
||||||
|
**/doc/api/
|
||||||
|
.dart_tool/
|
||||||
|
.flutter-plugins
|
||||||
|
.packages
|
||||||
|
.pub-cache/
|
||||||
|
.pub/
|
||||||
|
build/
|
||||||
|
|
||||||
|
# Android related
|
||||||
|
**/android/**/gradle-wrapper.jar
|
||||||
|
**/android/.gradle
|
||||||
|
**/android/captures/
|
||||||
|
**/android/gradlew
|
||||||
|
**/android/gradlew.bat
|
||||||
|
**/android/local.properties
|
||||||
|
**/android/**/GeneratedPluginRegistrant.java
|
||||||
|
|
||||||
|
# iOS/XCode related
|
||||||
|
**/ios/**/*.mode1v3
|
||||||
|
**/ios/**/*.mode2v3
|
||||||
|
**/ios/**/*.moved-aside
|
||||||
|
**/ios/**/*.pbxuser
|
||||||
|
**/ios/**/*.perspectivev3
|
||||||
|
**/ios/**/*sync/
|
||||||
|
**/ios/**/.sconsign.dblite
|
||||||
|
**/ios/**/.tags*
|
||||||
|
**/ios/**/.vagrant/
|
||||||
|
**/ios/**/DerivedData/
|
||||||
|
**/ios/**/Icon?
|
||||||
|
**/ios/**/Pods/
|
||||||
|
**/ios/**/.symlinks/
|
||||||
|
**/ios/**/profile
|
||||||
|
**/ios/**/xcuserdata
|
||||||
|
**/ios/.generated/
|
||||||
|
**/ios/Flutter/App.framework
|
||||||
|
**/ios/Flutter/Flutter.framework
|
||||||
|
**/ios/Flutter/Generated.xcconfig
|
||||||
|
**/ios/Flutter/app.flx
|
||||||
|
**/ios/Flutter/app.zip
|
||||||
|
**/ios/Flutter/flutter_assets/
|
||||||
|
**/ios/ServiceDefinitions.json
|
||||||
|
**/ios/Runner/GeneratedPluginRegistrant.*
|
||||||
|
|
||||||
|
# Exceptions to above rules.
|
||||||
|
!**/ios/**/default.mode1v3
|
||||||
|
!**/ios/**/default.mode2v3
|
||||||
|
!**/ios/**/default.pbxuser
|
||||||
|
!**/ios/**/default.perspectivev3
|
||||||
|
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# This file tracks properties of this Flutter project.
|
||||||
|
# Used by Flutter tool to assess capabilities and perform upgrades etc.
|
||||||
|
#
|
||||||
|
# This file should be version controlled and should not be manually edited.
|
||||||
|
|
||||||
|
version:
|
||||||
|
revision: 77512a3c46ec447cc64bac959e3043c2f0bdd446
|
||||||
|
channel: master
|
||||||
|
|
||||||
|
project_type: app
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
# cupertino_controllers_example
|
||||||
|
|
||||||
|
Demonstrates how to use the cupertino_controllers plugin.
|
||||||
|
|
||||||
|
## Getting Started
|
||||||
|
|
||||||
|
This project is a starting point for a Flutter application.
|
||||||
|
|
||||||
|
A few resources to get you started if this is your first Flutter project:
|
||||||
|
|
||||||
|
- [Lab: Write your first Flutter app](https://flutter.io/docs/get-started/codelab)
|
||||||
|
- [Cookbook: Useful Flutter samples](https://flutter.io/docs/cookbook)
|
||||||
|
|
||||||
|
For help getting started with Flutter, view our
|
||||||
|
[online documentation](https://flutter.io/docs), which offers tutorials,
|
||||||
|
samples, guidance on mobile development, and a full API reference.
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
gradle-wrapper.jar
|
||||||
|
/.gradle
|
||||||
|
/captures/
|
||||||
|
/gradlew
|
||||||
|
/gradlew.bat
|
||||||
|
/local.properties
|
||||||
|
GeneratedPluginRegistrant.java
|
||||||
|
|
||||||
|
# Remember to never publicly share your keystore.
|
||||||
|
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
|
||||||
|
key.properties
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
def localProperties = new Properties()
|
||||||
|
def localPropertiesFile = rootProject.file('local.properties')
|
||||||
|
if (localPropertiesFile.exists()) {
|
||||||
|
localPropertiesFile.withReader('UTF-8') { reader ->
|
||||||
|
localProperties.load(reader)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
def flutterRoot = localProperties.getProperty('flutter.sdk')
|
||||||
|
if (flutterRoot == null) {
|
||||||
|
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
|
||||||
|
}
|
||||||
|
|
||||||
|
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
|
||||||
|
if (flutterVersionCode == null) {
|
||||||
|
flutterVersionCode = '1'
|
||||||
|
}
|
||||||
|
|
||||||
|
def flutterVersionName = localProperties.getProperty('flutter.versionName')
|
||||||
|
if (flutterVersionName == null) {
|
||||||
|
flutterVersionName = '1.0'
|
||||||
|
}
|
||||||
|
|
||||||
|
apply plugin: 'com.android.application'
|
||||||
|
apply plugin: 'kotlin-android'
|
||||||
|
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||||
|
|
||||||
|
android {
|
||||||
|
compileSdkVersion 30
|
||||||
|
|
||||||
|
sourceSets {
|
||||||
|
main.java.srcDirs += 'src/main/kotlin'
|
||||||
|
}
|
||||||
|
|
||||||
|
defaultConfig {
|
||||||
|
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||||
|
applicationId "com.example.example"
|
||||||
|
minSdkVersion 16
|
||||||
|
targetSdkVersion 30
|
||||||
|
versionCode flutterVersionCode.toInteger()
|
||||||
|
versionName flutterVersionName
|
||||||
|
}
|
||||||
|
|
||||||
|
buildTypes {
|
||||||
|
release {
|
||||||
|
// TODO: Add your own signing config for the release build.
|
||||||
|
// Signing with the debug keys for now, so `flutter run --release` works.
|
||||||
|
signingConfig signingConfigs.debug
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
flutter {
|
||||||
|
source '../..'
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
package="com.example.example">
|
||||||
|
<!-- Flutter needs it to communicate with the running application
|
||||||
|
to allow setting breakpoints, to provide hot reload, etc.
|
||||||
|
-->
|
||||||
|
<uses-permission android:name="android.permission.INTERNET"/>
|
||||||
|
</manifest>
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
package="com.example.example">
|
||||||
|
<application
|
||||||
|
android:label="example"
|
||||||
|
android:icon="@mipmap/ic_launcher">
|
||||||
|
<activity
|
||||||
|
android:name=".MainActivity"
|
||||||
|
android:launchMode="singleTop"
|
||||||
|
android:theme="@style/LaunchTheme"
|
||||||
|
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
||||||
|
android:hardwareAccelerated="true"
|
||||||
|
android:windowSoftInputMode="adjustResize">
|
||||||
|
<!-- Specifies an Android theme to apply to this Activity as soon as
|
||||||
|
the Android process has started. This theme is visible to the user
|
||||||
|
while the Flutter UI initializes. After that, this theme continues
|
||||||
|
to determine the Window background behind the Flutter UI. -->
|
||||||
|
<meta-data
|
||||||
|
android:name="io.flutter.embedding.android.NormalTheme"
|
||||||
|
android:resource="@style/NormalTheme"
|
||||||
|
/>
|
||||||
|
<!-- Displays an Android View that continues showing the launch screen
|
||||||
|
Drawable until Flutter paints its first frame, then this splash
|
||||||
|
screen fades out. A splash screen is useful to avoid any visual
|
||||||
|
gap between the end of Android's launch screen and the painting of
|
||||||
|
Flutter's first frame. -->
|
||||||
|
<meta-data
|
||||||
|
android:name="io.flutter.embedding.android.SplashScreenDrawable"
|
||||||
|
android:resource="@drawable/launch_background"
|
||||||
|
/>
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.MAIN"/>
|
||||||
|
<category android:name="android.intent.category.LAUNCHER"/>
|
||||||
|
</intent-filter>
|
||||||
|
</activity>
|
||||||
|
<!-- Don't delete the meta-data below.
|
||||||
|
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
|
||||||
|
<meta-data
|
||||||
|
android:name="flutterEmbedding"
|
||||||
|
android:value="2" />
|
||||||
|
</application>
|
||||||
|
</manifest>
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
package com.example.example
|
||||||
|
|
||||||
|
import io.flutter.embedding.android.FlutterActivity
|
||||||
|
|
||||||
|
class MainActivity: FlutterActivity() {
|
||||||
|
}
|
||||||
|
Before Width: | Height: | Size: 544 B After Width: | Height: | Size: 544 B |
|
Before Width: | Height: | Size: 442 B After Width: | Height: | Size: 442 B |
|
Before Width: | Height: | Size: 721 B After Width: | Height: | Size: 721 B |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
@@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
|
||||||
|
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||||
|
<!-- Show a splash screen on the activity. Automatically removed when
|
||||||
|
Flutter draws its first frame -->
|
||||||
|
<item name="android:windowBackground">@drawable/launch_background</item>
|
||||||
|
</style>
|
||||||
|
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||||
|
This theme determines the color of the Android Window while your
|
||||||
|
Flutter UI initializes, as well as behind your Flutter UI while its
|
||||||
|
running.
|
||||||
|
|
||||||
|
This Theme is only used starting with V2 of Flutter's Android embedding. -->
|
||||||
|
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||||
|
<item name="android:windowBackground">?android:colorBackground</item>
|
||||||
|
</style>
|
||||||
|
</resources>
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
|
||||||
|
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
||||||
|
<!-- Show a splash screen on the activity. Automatically removed when
|
||||||
|
Flutter draws its first frame -->
|
||||||
|
<item name="android:windowBackground">@drawable/launch_background</item>
|
||||||
|
</style>
|
||||||
|
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||||
|
This theme determines the color of the Android Window while your
|
||||||
|
Flutter UI initializes, as well as behind your Flutter UI while its
|
||||||
|
running.
|
||||||
|
|
||||||
|
This Theme is only used starting with V2 of Flutter's Android embedding. -->
|
||||||
|
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
||||||
|
<item name="android:windowBackground">?android:colorBackground</item>
|
||||||
|
</style>
|
||||||
|
</resources>
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
package="com.example.example">
|
||||||
|
<!-- Flutter needs it to communicate with the running application
|
||||||
|
to allow setting breakpoints, to provide hot reload, etc.
|
||||||
|
-->
|
||||||
|
<uses-permission android:name="android.permission.INTERNET"/>
|
||||||
|
</manifest>
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
buildscript {
|
||||||
|
ext.kotlin_version = '1.3.50'
|
||||||
|
repositories {
|
||||||
|
google()
|
||||||
|
jcenter()
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
classpath 'com.android.tools.build:gradle:4.1.0'
|
||||||
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
allprojects {
|
||||||
|
repositories {
|
||||||
|
google()
|
||||||
|
jcenter()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
rootProject.buildDir = '../build'
|
||||||
|
subprojects {
|
||||||
|
project.buildDir = "${rootProject.buildDir}/${project.name}"
|
||||||
|
}
|
||||||
|
subprojects {
|
||||||
|
project.evaluationDependsOn(':app')
|
||||||
|
}
|
||||||
|
|
||||||
|
task clean(type: Delete) {
|
||||||
|
delete rootProject.buildDir
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
org.gradle.jvmargs=-Xmx1536M
|
||||||
|
android.useAndroidX=true
|
||||||
|
android.enableJetifier=true
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
#Fri Jun 23 08:50:38 CEST 2017
|
||||||
|
distributionBase=GRADLE_USER_HOME
|
||||||
|
distributionPath=wrapper/dists
|
||||||
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
zipStorePath=wrapper/dists
|
||||||
|
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
include ':app'
|
||||||
|
|
||||||
|
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
|
||||||
|
def properties = new Properties()
|
||||||
|
|
||||||
|
assert localPropertiesFile.exists()
|
||||||
|
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
|
||||||
|
|
||||||
|
def flutterSdkPath = properties.getProperty("flutter.sdk")
|
||||||
|
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
|
||||||
|
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
*.mode1v3
|
||||||
|
*.mode2v3
|
||||||
|
*.moved-aside
|
||||||
|
*.pbxuser
|
||||||
|
*.perspectivev3
|
||||||
|
**/*sync/
|
||||||
|
.sconsign.dblite
|
||||||
|
.tags*
|
||||||
|
**/.vagrant/
|
||||||
|
**/DerivedData/
|
||||||
|
Icon?
|
||||||
|
**/Pods/
|
||||||
|
**/.symlinks/
|
||||||
|
profile
|
||||||
|
xcuserdata
|
||||||
|
**/.generated/
|
||||||
|
Flutter/App.framework
|
||||||
|
Flutter/Flutter.framework
|
||||||
|
Flutter/Flutter.podspec
|
||||||
|
Flutter/Generated.xcconfig
|
||||||
|
Flutter/app.flx
|
||||||
|
Flutter/app.zip
|
||||||
|
Flutter/flutter_assets/
|
||||||
|
Flutter/flutter_export_environment.sh
|
||||||
|
ServiceDefinitions.json
|
||||||
|
Runner/GeneratedPluginRegistrant.*
|
||||||
|
|
||||||
|
# Exceptions to above rules.
|
||||||
|
!default.mode1v3
|
||||||
|
!default.mode2v3
|
||||||
|
!default.pbxuser
|
||||||
|
!default.perspectivev3
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
|
<string>en</string>
|
||||||
|
<key>CFBundleExecutable</key>
|
||||||
|
<string>App</string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>io.flutter.flutter.app</string>
|
||||||
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
<string>6.0</string>
|
||||||
|
<key>CFBundleName</key>
|
||||||
|
<string>App</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>FMWK</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>1.0</string>
|
||||||
|
<key>CFBundleSignature</key>
|
||||||
|
<string>????</string>
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string>1.0</string>
|
||||||
|
<key>MinimumOSVersion</key>
|
||||||
|
<string>8.0</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
@@ -0,0 +1,471 @@
|
|||||||
|
// !$*UTF8*$!
|
||||||
|
{
|
||||||
|
archiveVersion = 1;
|
||||||
|
classes = {
|
||||||
|
};
|
||||||
|
objectVersion = 46;
|
||||||
|
objects = {
|
||||||
|
|
||||||
|
/* Begin PBXBuildFile section */
|
||||||
|
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
|
||||||
|
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
|
||||||
|
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
|
||||||
|
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
|
||||||
|
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
|
||||||
|
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
|
||||||
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
|
/* Begin PBXCopyFilesBuildPhase section */
|
||||||
|
9705A1C41CF9048500538489 /* Embed Frameworks */ = {
|
||||||
|
isa = PBXCopyFilesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
dstPath = "";
|
||||||
|
dstSubfolderSpec = 10;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
name = "Embed Frameworks";
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXCopyFilesBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXFileReference section */
|
||||||
|
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
|
||||||
|
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
|
||||||
|
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
|
||||||
|
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
|
||||||
|
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||||
|
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
|
||||||
|
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
|
||||||
|
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
|
||||||
|
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
|
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
|
||||||
|
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||||
|
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||||
|
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||||
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
|
/* Begin PBXFrameworksBuildPhase section */
|
||||||
|
97C146EB1CF9000F007C117D /* Frameworks */ = {
|
||||||
|
isa = PBXFrameworksBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXFrameworksBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXGroup section */
|
||||||
|
9740EEB11CF90186004384FC /* Flutter */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
|
||||||
|
9740EEB21CF90195004384FC /* Debug.xcconfig */,
|
||||||
|
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
|
||||||
|
9740EEB31CF90195004384FC /* Generated.xcconfig */,
|
||||||
|
);
|
||||||
|
name = Flutter;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
97C146E51CF9000F007C117D = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
9740EEB11CF90186004384FC /* Flutter */,
|
||||||
|
97C146F01CF9000F007C117D /* Runner */,
|
||||||
|
97C146EF1CF9000F007C117D /* Products */,
|
||||||
|
);
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
97C146EF1CF9000F007C117D /* Products */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
97C146EE1CF9000F007C117D /* Runner.app */,
|
||||||
|
);
|
||||||
|
name = Products;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
97C146F01CF9000F007C117D /* Runner */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
97C146FA1CF9000F007C117D /* Main.storyboard */,
|
||||||
|
97C146FD1CF9000F007C117D /* Assets.xcassets */,
|
||||||
|
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
|
||||||
|
97C147021CF9000F007C117D /* Info.plist */,
|
||||||
|
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
|
||||||
|
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
|
||||||
|
74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
|
||||||
|
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
|
||||||
|
);
|
||||||
|
path = Runner;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
/* End PBXGroup section */
|
||||||
|
|
||||||
|
/* Begin PBXNativeTarget section */
|
||||||
|
97C146ED1CF9000F007C117D /* Runner */ = {
|
||||||
|
isa = PBXNativeTarget;
|
||||||
|
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
|
||||||
|
buildPhases = (
|
||||||
|
9740EEB61CF901F6004384FC /* Run Script */,
|
||||||
|
97C146EA1CF9000F007C117D /* Sources */,
|
||||||
|
97C146EB1CF9000F007C117D /* Frameworks */,
|
||||||
|
97C146EC1CF9000F007C117D /* Resources */,
|
||||||
|
9705A1C41CF9048500538489 /* Embed Frameworks */,
|
||||||
|
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
|
||||||
|
);
|
||||||
|
buildRules = (
|
||||||
|
);
|
||||||
|
dependencies = (
|
||||||
|
);
|
||||||
|
name = Runner;
|
||||||
|
productName = Runner;
|
||||||
|
productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
|
||||||
|
productType = "com.apple.product-type.application";
|
||||||
|
};
|
||||||
|
/* End PBXNativeTarget section */
|
||||||
|
|
||||||
|
/* Begin PBXProject section */
|
||||||
|
97C146E61CF9000F007C117D /* Project object */ = {
|
||||||
|
isa = PBXProject;
|
||||||
|
attributes = {
|
||||||
|
LastUpgradeCheck = 1020;
|
||||||
|
ORGANIZATIONNAME = "";
|
||||||
|
TargetAttributes = {
|
||||||
|
97C146ED1CF9000F007C117D = {
|
||||||
|
CreatedOnToolsVersion = 7.3.1;
|
||||||
|
LastSwiftMigration = 1100;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
|
||||||
|
compatibilityVersion = "Xcode 9.3";
|
||||||
|
developmentRegion = en;
|
||||||
|
hasScannedForEncodings = 0;
|
||||||
|
knownRegions = (
|
||||||
|
en,
|
||||||
|
Base,
|
||||||
|
);
|
||||||
|
mainGroup = 97C146E51CF9000F007C117D;
|
||||||
|
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
|
||||||
|
projectDirPath = "";
|
||||||
|
projectRoot = "";
|
||||||
|
targets = (
|
||||||
|
97C146ED1CF9000F007C117D /* Runner */,
|
||||||
|
);
|
||||||
|
};
|
||||||
|
/* End PBXProject section */
|
||||||
|
|
||||||
|
/* Begin PBXResourcesBuildPhase section */
|
||||||
|
97C146EC1CF9000F007C117D /* Resources */ = {
|
||||||
|
isa = PBXResourcesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
|
||||||
|
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
|
||||||
|
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
|
||||||
|
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXResourcesBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXShellScriptBuildPhase section */
|
||||||
|
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
|
||||||
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
inputPaths = (
|
||||||
|
);
|
||||||
|
name = "Thin Binary";
|
||||||
|
outputPaths = (
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
shellPath = /bin/sh;
|
||||||
|
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
|
||||||
|
};
|
||||||
|
9740EEB61CF901F6004384FC /* Run Script */ = {
|
||||||
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
inputPaths = (
|
||||||
|
);
|
||||||
|
name = "Run Script";
|
||||||
|
outputPaths = (
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
shellPath = /bin/sh;
|
||||||
|
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
|
||||||
|
};
|
||||||
|
/* End PBXShellScriptBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXSourcesBuildPhase section */
|
||||||
|
97C146EA1CF9000F007C117D /* Sources */ = {
|
||||||
|
isa = PBXSourcesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
|
||||||
|
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXSourcesBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXVariantGroup section */
|
||||||
|
97C146FA1CF9000F007C117D /* Main.storyboard */ = {
|
||||||
|
isa = PBXVariantGroup;
|
||||||
|
children = (
|
||||||
|
97C146FB1CF9000F007C117D /* Base */,
|
||||||
|
);
|
||||||
|
name = Main.storyboard;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
|
||||||
|
isa = PBXVariantGroup;
|
||||||
|
children = (
|
||||||
|
97C147001CF9000F007C117D /* Base */,
|
||||||
|
);
|
||||||
|
name = LaunchScreen.storyboard;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
/* End PBXVariantGroup section */
|
||||||
|
|
||||||
|
/* Begin XCBuildConfiguration section */
|
||||||
|
249021D3217E4FDB00AE95B9 /* Profile */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
|
CLANG_ANALYZER_NONNULL = YES;
|
||||||
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||||
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CLANG_ENABLE_OBJC_ARC = YES;
|
||||||
|
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||||
|
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_COMMA = YES;
|
||||||
|
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||||
|
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||||
|
CLANG_WARN_EMPTY_BODY = YES;
|
||||||
|
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||||
|
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||||
|
CLANG_WARN_INT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||||
|
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||||
|
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||||
|
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||||
|
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||||
|
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||||
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||||
|
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||||
|
COPY_PHASE_STRIP = NO;
|
||||||
|
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||||
|
ENABLE_NS_ASSERTIONS = NO;
|
||||||
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
|
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||||
|
GCC_NO_COMMON_BLOCKS = YES;
|
||||||
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||||
|
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||||
|
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||||
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||||
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
|
SDKROOT = iphoneos;
|
||||||
|
SUPPORTED_PLATFORMS = iphoneos;
|
||||||
|
TARGETED_DEVICE_FAMILY = "1,2";
|
||||||
|
VALIDATE_PRODUCT = YES;
|
||||||
|
};
|
||||||
|
name = Profile;
|
||||||
|
};
|
||||||
|
249021D4217E4FDB00AE95B9 /* Profile */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
||||||
|
buildSettings = {
|
||||||
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||||
|
ENABLE_BITCODE = NO;
|
||||||
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = com.example.example;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
|
SWIFT_VERSION = 5.0;
|
||||||
|
VERSIONING_SYSTEM = "apple-generic";
|
||||||
|
};
|
||||||
|
name = Profile;
|
||||||
|
};
|
||||||
|
97C147031CF9000F007C117D /* Debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
|
CLANG_ANALYZER_NONNULL = YES;
|
||||||
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||||
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CLANG_ENABLE_OBJC_ARC = YES;
|
||||||
|
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||||
|
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_COMMA = YES;
|
||||||
|
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||||
|
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||||
|
CLANG_WARN_EMPTY_BODY = YES;
|
||||||
|
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||||
|
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||||
|
CLANG_WARN_INT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||||
|
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||||
|
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||||
|
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||||
|
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||||
|
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||||
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||||
|
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||||
|
COPY_PHASE_STRIP = NO;
|
||||||
|
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||||
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
|
ENABLE_TESTABILITY = YES;
|
||||||
|
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||||
|
GCC_DYNAMIC_NO_PIC = NO;
|
||||||
|
GCC_NO_COMMON_BLOCKS = YES;
|
||||||
|
GCC_OPTIMIZATION_LEVEL = 0;
|
||||||
|
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||||
|
"DEBUG=1",
|
||||||
|
"$(inherited)",
|
||||||
|
);
|
||||||
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||||
|
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||||
|
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||||
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||||
|
MTL_ENABLE_DEBUG_INFO = YES;
|
||||||
|
ONLY_ACTIVE_ARCH = YES;
|
||||||
|
SDKROOT = iphoneos;
|
||||||
|
TARGETED_DEVICE_FAMILY = "1,2";
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
97C147041CF9000F007C117D /* Release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
|
CLANG_ANALYZER_NONNULL = YES;
|
||||||
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||||
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CLANG_ENABLE_OBJC_ARC = YES;
|
||||||
|
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||||
|
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_COMMA = YES;
|
||||||
|
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||||
|
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||||
|
CLANG_WARN_EMPTY_BODY = YES;
|
||||||
|
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||||
|
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||||
|
CLANG_WARN_INT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||||
|
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||||
|
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||||
|
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||||
|
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||||
|
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||||
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||||
|
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||||
|
COPY_PHASE_STRIP = NO;
|
||||||
|
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||||
|
ENABLE_NS_ASSERTIONS = NO;
|
||||||
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
|
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||||
|
GCC_NO_COMMON_BLOCKS = YES;
|
||||||
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||||
|
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||||
|
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||||
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||||
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
|
SDKROOT = iphoneos;
|
||||||
|
SUPPORTED_PLATFORMS = iphoneos;
|
||||||
|
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||||
|
TARGETED_DEVICE_FAMILY = "1,2";
|
||||||
|
VALIDATE_PRODUCT = YES;
|
||||||
|
};
|
||||||
|
name = Release;
|
||||||
|
};
|
||||||
|
97C147061CF9000F007C117D /* Debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
|
||||||
|
buildSettings = {
|
||||||
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||||
|
ENABLE_BITCODE = NO;
|
||||||
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = com.example.example;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
|
SWIFT_VERSION = 5.0;
|
||||||
|
VERSIONING_SYSTEM = "apple-generic";
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
97C147071CF9000F007C117D /* Release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
||||||
|
buildSettings = {
|
||||||
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||||
|
ENABLE_BITCODE = NO;
|
||||||
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = com.example.example;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
|
SWIFT_VERSION = 5.0;
|
||||||
|
VERSIONING_SYSTEM = "apple-generic";
|
||||||
|
};
|
||||||
|
name = Release;
|
||||||
|
};
|
||||||
|
/* End XCBuildConfiguration section */
|
||||||
|
|
||||||
|
/* Begin XCConfigurationList section */
|
||||||
|
97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
|
||||||
|
isa = XCConfigurationList;
|
||||||
|
buildConfigurations = (
|
||||||
|
97C147031CF9000F007C117D /* Debug */,
|
||||||
|
97C147041CF9000F007C117D /* Release */,
|
||||||
|
249021D3217E4FDB00AE95B9 /* Profile */,
|
||||||
|
);
|
||||||
|
defaultConfigurationIsVisible = 0;
|
||||||
|
defaultConfigurationName = Release;
|
||||||
|
};
|
||||||
|
97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
|
||||||
|
isa = XCConfigurationList;
|
||||||
|
buildConfigurations = (
|
||||||
|
97C147061CF9000F007C117D /* Debug */,
|
||||||
|
97C147071CF9000F007C117D /* Release */,
|
||||||
|
249021D4217E4FDB00AE95B9 /* Profile */,
|
||||||
|
);
|
||||||
|
defaultConfigurationIsVisible = 0;
|
||||||
|
defaultConfigurationName = Release;
|
||||||
|
};
|
||||||
|
/* End XCConfigurationList section */
|
||||||
|
};
|
||||||
|
rootObject = 97C146E61CF9000F007C117D /* Project object */;
|
||||||
|
}
|
||||||
@@ -0,0 +1,91 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Scheme
|
||||||
|
LastUpgradeVersion = "1020"
|
||||||
|
version = "1.3">
|
||||||
|
<BuildAction
|
||||||
|
parallelizeBuildables = "YES"
|
||||||
|
buildImplicitDependencies = "YES">
|
||||||
|
<BuildActionEntries>
|
||||||
|
<BuildActionEntry
|
||||||
|
buildForTesting = "YES"
|
||||||
|
buildForRunning = "YES"
|
||||||
|
buildForProfiling = "YES"
|
||||||
|
buildForArchiving = "YES"
|
||||||
|
buildForAnalyzing = "YES">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||||
|
BuildableName = "Runner.app"
|
||||||
|
BlueprintName = "Runner"
|
||||||
|
ReferencedContainer = "container:Runner.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildActionEntry>
|
||||||
|
</BuildActionEntries>
|
||||||
|
</BuildAction>
|
||||||
|
<TestAction
|
||||||
|
buildConfiguration = "Debug"
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||||
|
<Testables>
|
||||||
|
</Testables>
|
||||||
|
<MacroExpansion>
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||||
|
BuildableName = "Runner.app"
|
||||||
|
BlueprintName = "Runner"
|
||||||
|
ReferencedContainer = "container:Runner.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</MacroExpansion>
|
||||||
|
<AdditionalOptions>
|
||||||
|
</AdditionalOptions>
|
||||||
|
</TestAction>
|
||||||
|
<LaunchAction
|
||||||
|
buildConfiguration = "Debug"
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
launchStyle = "0"
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
ignoresPersistentStateOnLaunch = "NO"
|
||||||
|
debugDocumentVersioning = "YES"
|
||||||
|
debugServiceExtension = "internal"
|
||||||
|
allowLocationSimulation = "YES">
|
||||||
|
<BuildableProductRunnable
|
||||||
|
runnableDebuggingMode = "0">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||||
|
BuildableName = "Runner.app"
|
||||||
|
BlueprintName = "Runner"
|
||||||
|
ReferencedContainer = "container:Runner.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildableProductRunnable>
|
||||||
|
<AdditionalOptions>
|
||||||
|
</AdditionalOptions>
|
||||||
|
</LaunchAction>
|
||||||
|
<ProfileAction
|
||||||
|
buildConfiguration = "Profile"
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||||
|
savedToolIdentifier = ""
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
debugDocumentVersioning = "YES">
|
||||||
|
<BuildableProductRunnable
|
||||||
|
runnableDebuggingMode = "0">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||||
|
BuildableName = "Runner.app"
|
||||||
|
BlueprintName = "Runner"
|
||||||
|
ReferencedContainer = "container:Runner.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildableProductRunnable>
|
||||||
|
</ProfileAction>
|
||||||
|
<AnalyzeAction
|
||||||
|
buildConfiguration = "Debug">
|
||||||
|
</AnalyzeAction>
|
||||||
|
<ArchiveAction
|
||||||
|
buildConfiguration = "Release"
|
||||||
|
revealArchiveInOrganizer = "YES">
|
||||||
|
</ArchiveAction>
|
||||||
|
</Scheme>
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
import UIKit
|
||||||
|
import Flutter
|
||||||
|
|
||||||
|
@UIApplicationMain
|
||||||
|
@objc class AppDelegate: FlutterAppDelegate {
|
||||||
|
override func application(
|
||||||
|
_ application: UIApplication,
|
||||||
|
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
|
||||||
|
) -> Bool {
|
||||||
|
GeneratedPluginRegistrant.register(with: self)
|
||||||
|
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 564 B |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 68 B After Width: | Height: | Size: 68 B |
|
Before Width: | Height: | Size: 68 B After Width: | Height: | Size: 68 B |
|
Before Width: | Height: | Size: 68 B After Width: | Height: | Size: 68 B |
@@ -0,0 +1,45 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
|
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||||
|
<key>CFBundleExecutable</key>
|
||||||
|
<string>$(EXECUTABLE_NAME)</string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||||
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
<string>6.0</string>
|
||||||
|
<key>CFBundleName</key>
|
||||||
|
<string>example</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>APPL</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>$(FLUTTER_BUILD_NAME)</string>
|
||||||
|
<key>CFBundleSignature</key>
|
||||||
|
<string>????</string>
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string>$(FLUTTER_BUILD_NUMBER)</string>
|
||||||
|
<key>LSRequiresIPhoneOS</key>
|
||||||
|
<true/>
|
||||||
|
<key>UILaunchStoryboardName</key>
|
||||||
|
<string>LaunchScreen</string>
|
||||||
|
<key>UIMainStoryboardFile</key>
|
||||||
|
<string>Main</string>
|
||||||
|
<key>UISupportedInterfaceOrientations</key>
|
||||||
|
<array>
|
||||||
|
<string>UIInterfaceOrientationPortrait</string>
|
||||||
|
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||||
|
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||||
|
</array>
|
||||||
|
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||||
|
<array>
|
||||||
|
<string>UIInterfaceOrientationPortrait</string>
|
||||||
|
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||||
|
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||||
|
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||||
|
</array>
|
||||||
|
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||||
|
<false/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class DetailsScreen extends StatelessWidget {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
// appBar: NativeAppBar(
|
||||||
|
// title: Text("Details"),
|
||||||
|
// ios: CupertinoNavigationBarData(
|
||||||
|
// heroTag: "Details",
|
||||||
|
// previousPageTitle: "List View",
|
||||||
|
// transitionBetweenRoutes: false,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// body: Container(),
|
||||||
|
body: CupertinoPageScaffold(
|
||||||
|
child: CustomScrollView(
|
||||||
|
semanticChildCount: 2,
|
||||||
|
slivers: <Widget>[
|
||||||
|
CupertinoSliverNavigationBar(
|
||||||
|
// trailing: trailingButtons,
|
||||||
|
// middle: Text("Presidents"),
|
||||||
|
largeTitle: Text("Details"),
|
||||||
|
// previousPageTitle: "",
|
||||||
|
),
|
||||||
|
SliverToBoxAdapter(
|
||||||
|
child: Container(),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'tabs/master_detail_controller.dart';
|
||||||
|
|
||||||
|
import 'tabs/table_view_controller.dart';
|
||||||
|
|
||||||
|
import 'package:flutter/foundation.dart';
|
||||||
|
|
||||||
|
void main() => runApp(MyApp());
|
||||||
|
|
||||||
|
class MyApp extends StatelessWidget {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return new MaterialApp(
|
||||||
|
debugShowCheckedModeBanner: false,
|
||||||
|
home: CupertinoControllersApp(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class CupertinoControllersApp extends StatelessWidget {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return CupertinoTabScaffold(
|
||||||
|
tabBar: CupertinoTabBar(
|
||||||
|
items: [
|
||||||
|
BottomNavigationBarItem(
|
||||||
|
icon: Icon(Icons.list),
|
||||||
|
title: Text("Table"),
|
||||||
|
),
|
||||||
|
BottomNavigationBarItem(
|
||||||
|
icon: Icon(Icons.layers),
|
||||||
|
title: Text("Mater Detail"),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
tabBuilder: (BuildContext context, int index) {
|
||||||
|
final pages = [
|
||||||
|
_Page(title: "Table View", child: TableViewScreen()),
|
||||||
|
_Page(title: "Master Detail", child: MasterDetailScreen()),
|
||||||
|
];
|
||||||
|
return CupertinoTabView(
|
||||||
|
builder: (BuildContext context) {
|
||||||
|
return pages[index]?.child;
|
||||||
|
},
|
||||||
|
defaultTitle: pages[index]?.title,
|
||||||
|
);
|
||||||
|
;
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class _Page {
|
||||||
|
final Widget child;
|
||||||
|
final String title;
|
||||||
|
|
||||||
|
_Page({
|
||||||
|
this.title,
|
||||||
|
this.child,
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -0,0 +1,87 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:cupertino_controllers/cupertino_controllers.dart';
|
||||||
|
import '../details/screen.dart';
|
||||||
|
|
||||||
|
class MasterDetailScreen extends StatefulWidget {
|
||||||
|
@override
|
||||||
|
MasterDetailScreenState createState() {
|
||||||
|
return new MasterDetailScreenState();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class MasterDetailScreenState extends State<MasterDetailScreen> {
|
||||||
|
List<String> _items = ["Test", "Hello", "World"];
|
||||||
|
String _selectedItem;
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return CupertinoMasterDetailController(
|
||||||
|
appBar: CupertinoNavigationBar(
|
||||||
|
middle: Text("Master Detail"),
|
||||||
|
),
|
||||||
|
detailBuilder: (context, item, tablet) {
|
||||||
|
if (tablet && item == null) {
|
||||||
|
return Scaffold(
|
||||||
|
body: Center(child: Text("No Item Selected")),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
final String _item = item;
|
||||||
|
|
||||||
|
if (tablet) {
|
||||||
|
return Scaffold(
|
||||||
|
body: Center(
|
||||||
|
child: Text(_item),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return Scaffold(
|
||||||
|
body: CustomScrollView(
|
||||||
|
semanticChildCount: 2,
|
||||||
|
slivers: <Widget>[
|
||||||
|
CupertinoSliverNavigationBar(
|
||||||
|
// trailing: trailingButtons,
|
||||||
|
// middle: Text("Presidents"),
|
||||||
|
previousPageTitle: "Presidents",
|
||||||
|
largeTitle: Text("Details"),
|
||||||
|
),
|
||||||
|
SliverToBoxAdapter(
|
||||||
|
child: Center(
|
||||||
|
child: Text(_item),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
// return DetailsScreen();
|
||||||
|
},
|
||||||
|
selectedItem: _selectedItem,
|
||||||
|
itemSelected: (value) {
|
||||||
|
setState(() {
|
||||||
|
_selectedItem = value;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
itemBuilder: (BuildContext context, int index) {
|
||||||
|
final _item = _items[index];
|
||||||
|
return CupertinoListTile(
|
||||||
|
title: Text(_item),
|
||||||
|
subtitle: Text("Details"),
|
||||||
|
ios: CupertinoListTileData(
|
||||||
|
hideLeadingIcon: true,
|
||||||
|
style: CupertinoCellStyle.subtitle,
|
||||||
|
accessory: CupertinoAccessory.disclosureIndicator,
|
||||||
|
editingAccessory: CupertinoEditingAccessory.detail,
|
||||||
|
editingAccessoryTap: () {
|
||||||
|
Navigator.push<dynamic>(
|
||||||
|
context,
|
||||||
|
CupertinoPageRoute<dynamic>(
|
||||||
|
title: "Details",
|
||||||
|
builder: (BuildContext context) => DetailsScreen()));
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
items: _items,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,360 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_slidable/flutter_slidable.dart';
|
||||||
|
import 'package:cupertino_controllers/cupertino_controllers.dart';
|
||||||
|
import '../details/screen.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
|
||||||
|
class TableViewScreen extends StatefulWidget {
|
||||||
|
@override
|
||||||
|
TableViewScreenState createState() {
|
||||||
|
return new TableViewScreenState();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class TableViewScreenState extends State<TableViewScreen>
|
||||||
|
with SingleTickerProviderStateMixin {
|
||||||
|
bool _isEditing = false;
|
||||||
|
bool _isSearching = false;
|
||||||
|
String _search = "";
|
||||||
|
final TextEditingController _controller = TextEditingController();
|
||||||
|
final FocusNode _focusNode = FocusNode();
|
||||||
|
Animation<double> _animation;
|
||||||
|
AnimationController _animationController;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
_animationController = new AnimationController(
|
||||||
|
duration: new Duration(milliseconds: 200),
|
||||||
|
vsync: this,
|
||||||
|
);
|
||||||
|
_animation = new CurvedAnimation(
|
||||||
|
parent: _animationController,
|
||||||
|
curve: Curves.easeInOut,
|
||||||
|
reverseCurve: Curves.easeInOut,
|
||||||
|
);
|
||||||
|
_focusNode.addListener(() {
|
||||||
|
if (!_animationController.isAnimating) {
|
||||||
|
_animationController.forward();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
super.initState();
|
||||||
|
}
|
||||||
|
|
||||||
|
final Map<int, Widget> children = const <int, Widget>{
|
||||||
|
0: Text('Select'),
|
||||||
|
1: Text('Remove'),
|
||||||
|
2: Text('None'),
|
||||||
|
};
|
||||||
|
int sharedValue = 0;
|
||||||
|
|
||||||
|
final List<dynamic> selected = <dynamic>[];
|
||||||
|
|
||||||
|
void _removeItem(List<String> item) {
|
||||||
|
setState(() {
|
||||||
|
contacts.remove(item);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
List<List<String>> _searchItems(BuildContext context, {String search = ""}) {
|
||||||
|
final List<List<String>> filtered = [];
|
||||||
|
for (var _row in contacts) {
|
||||||
|
bool _contains = false;
|
||||||
|
if (_row[0].toLowerCase().trim().contains(search.toLowerCase().trim()))
|
||||||
|
_contains = true;
|
||||||
|
if (_row[1].toLowerCase().trim().contains(search.toLowerCase().trim()))
|
||||||
|
_contains = true;
|
||||||
|
if (_row[2].toLowerCase().trim().contains(search.toLowerCase().trim()))
|
||||||
|
_contains = true;
|
||||||
|
if (_contains) {
|
||||||
|
// filtered.add(_buildListTile(context, _row));
|
||||||
|
filtered.add(_row);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return filtered ?? [];
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
if (_isSearching) FocusScope.of(context).requestFocus(_focusNode);
|
||||||
|
|
||||||
|
var _sections = <CupertinoTableViewSection>[];
|
||||||
|
|
||||||
|
_sections = _buildSections(context,
|
||||||
|
data: _search != null && _search.isNotEmpty
|
||||||
|
? _searchItems(context, search: _search)
|
||||||
|
: contacts);
|
||||||
|
|
||||||
|
return CupertinoTableViewController.sectioned(
|
||||||
|
hideAppBarOnSearch: true,
|
||||||
|
trailing: GestureDetector(
|
||||||
|
child: Icon(
|
||||||
|
CupertinoIcons.share,
|
||||||
|
color: CupertinoColors.activeBlue,
|
||||||
|
),
|
||||||
|
onTap: () {},
|
||||||
|
),
|
||||||
|
sections: _sections ?? [],
|
||||||
|
widgets: <Widget>[
|
||||||
|
SafeArea(
|
||||||
|
top: _isSearching,
|
||||||
|
bottom: false,
|
||||||
|
child: CupertinoSearchBar(
|
||||||
|
controller: _controller,
|
||||||
|
focusNode: _focusNode,
|
||||||
|
animation: _animation,
|
||||||
|
onCancel: () {
|
||||||
|
_controller.clear();
|
||||||
|
_focusNode.unfocus();
|
||||||
|
_animationController.reverse();
|
||||||
|
setState(() {
|
||||||
|
_search = "";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
onClear: () {
|
||||||
|
_controller.clear();
|
||||||
|
setState(() {
|
||||||
|
_search = "";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
onChanged: (String value) {
|
||||||
|
if (value != null)
|
||||||
|
setState(() {
|
||||||
|
_search = value;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
padding: EdgeInsets.only(top: 8.0),
|
||||||
|
child: CupertinoSegmentedControl<int>(
|
||||||
|
children: children,
|
||||||
|
onValueChanged: (int newValue) {
|
||||||
|
setState(() {
|
||||||
|
sharedValue = newValue;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
groupValue: sharedValue,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Divider(),
|
||||||
|
],
|
||||||
|
onRefresh: () async {
|
||||||
|
await Future<void>.delayed(Duration(seconds: 1));
|
||||||
|
return;
|
||||||
|
},
|
||||||
|
isEditing: _isEditing,
|
||||||
|
onEditing: (bool value) {
|
||||||
|
if (value != null) {
|
||||||
|
setState(() {
|
||||||
|
_isEditing = value;
|
||||||
|
});
|
||||||
|
if (!_isEditing) {
|
||||||
|
setState(() {
|
||||||
|
selected.clear();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
isSearching: _isSearching,
|
||||||
|
showEditingButtonLeft: true,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
List<CupertinoTableViewSection> _buildSections(BuildContext context,
|
||||||
|
{@required List<List<String>> data}) {
|
||||||
|
data.sort((a, b) {
|
||||||
|
return a[0].toLowerCase().compareTo(b[0].toLowerCase());
|
||||||
|
});
|
||||||
|
|
||||||
|
List<CupertinoTableViewSection> sections = [];
|
||||||
|
|
||||||
|
var map = Map<String, dynamic>();
|
||||||
|
|
||||||
|
for (List<String> _contact in data) {
|
||||||
|
final String _letter = _contact[0].substring(0, 1).toUpperCase();
|
||||||
|
map[_letter] = <dynamic>[];
|
||||||
|
}
|
||||||
|
|
||||||
|
for (List<String> _contact in data) {
|
||||||
|
final String _letter = _contact[0].substring(0, 1).toUpperCase();
|
||||||
|
map[_letter].add(_contact);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (String _key in map.keys) {
|
||||||
|
sections.add(CupertinoTableViewSection.builder(
|
||||||
|
header: Text(_key,
|
||||||
|
style: TextStyle(
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
)),
|
||||||
|
itemBuilder: (BuildContext context, int index) {
|
||||||
|
return _buildListTile(context, map[_key][index]);
|
||||||
|
},
|
||||||
|
itemCount: map[_key]?.length ?? 0,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
return sections;
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buildListTile(BuildContext context, List<String> item) {
|
||||||
|
final bool _selected = selected?.contains(item) ?? false;
|
||||||
|
CupertinoEditingAction _action;
|
||||||
|
switch (sharedValue) {
|
||||||
|
case 0:
|
||||||
|
_action = CupertinoEditingAction.select;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
_action = CupertinoEditingAction.remove;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
_action = CupertinoEditingAction.none;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
}
|
||||||
|
return new Slidable(
|
||||||
|
key: Key(item[0]),
|
||||||
|
|
||||||
|
dismissal: SlidableDismissal(
|
||||||
|
child: SlidableDrawerDismissal(),
|
||||||
|
onDismissed: (actionType) {
|
||||||
|
_removeItem(item);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
actionPane: SlidableDrawerActionPane(),
|
||||||
|
actionExtentRatio: 0.25,
|
||||||
|
closeOnScroll: true,
|
||||||
|
child: CupertinoListTile(
|
||||||
|
selected: _selected,
|
||||||
|
editing: _isEditing,
|
||||||
|
avatar: Container(
|
||||||
|
height: 60.0,
|
||||||
|
width: 60.0,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.lightBlue,
|
||||||
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
leading: Icons.phone,
|
||||||
|
title: Text(item[0]),
|
||||||
|
subtitle: Text(item[1]),
|
||||||
|
trailing: <Widget>[
|
||||||
|
Text(item[2]),
|
||||||
|
],
|
||||||
|
onTap: () {
|
||||||
|
if (_isEditing) {
|
||||||
|
if (_action == CupertinoEditingAction.select) {
|
||||||
|
if (_selected) {
|
||||||
|
setState(() {
|
||||||
|
selected.remove(item);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
setState(() {
|
||||||
|
selected.add(item);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Navigator.push<dynamic>(
|
||||||
|
context,
|
||||||
|
CupertinoPageRoute<dynamic>(
|
||||||
|
title: "Details",
|
||||||
|
builder: (BuildContext context) => DetailsScreen()));
|
||||||
|
}
|
||||||
|
},
|
||||||
|
ios: CupertinoListTileData(
|
||||||
|
hideLeadingIcon: true,
|
||||||
|
style: CupertinoCellStyle.subtitle,
|
||||||
|
accessory: CupertinoAccessory.disclosureIndicator,
|
||||||
|
editingAction: _action,
|
||||||
|
editingAccessory: CupertinoEditingAccessory.detail,
|
||||||
|
editingAccessoryTap: () {
|
||||||
|
Navigator.push<dynamic>(
|
||||||
|
context,
|
||||||
|
CupertinoPageRoute<dynamic>(
|
||||||
|
title: "Details",
|
||||||
|
builder: (BuildContext context) => DetailsScreen()));
|
||||||
|
},
|
||||||
|
editingActionTap: _action == CupertinoEditingAction.remove
|
||||||
|
? () => _removeItem(item)
|
||||||
|
: null),
|
||||||
|
|
||||||
|
// onTap: () {},
|
||||||
|
),
|
||||||
|
// actions: <Widget>[
|
||||||
|
// new IconSlideAction(
|
||||||
|
// caption: 'Archive',
|
||||||
|
// color: Colors.blue,
|
||||||
|
// icon: Icons.archive,
|
||||||
|
// onTap: () {},
|
||||||
|
// ),
|
||||||
|
// new IconSlideAction(
|
||||||
|
// caption: 'Share',
|
||||||
|
// color: Colors.indigo,
|
||||||
|
// icon: Icons.share,
|
||||||
|
// onTap: () {},
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
secondaryActions: <Widget>[
|
||||||
|
// new IconSlideAction(
|
||||||
|
// caption: 'More',
|
||||||
|
// color: Colors.black45,
|
||||||
|
// icon: Icons.more_horiz,
|
||||||
|
// onTap: () {},
|
||||||
|
// ),
|
||||||
|
new IconSlideAction(
|
||||||
|
caption: 'Delete',
|
||||||
|
color: Colors.red,
|
||||||
|
icon: Icons.delete,
|
||||||
|
onTap: () => _removeItem(item),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
List<List<String>> contacts = <List<String>>[
|
||||||
|
<String>['George Washington', 'Westmoreland County', ' 4/30/1789'],
|
||||||
|
<String>['John Adams', 'Braintree', ' 3/4/1797'],
|
||||||
|
<String>['Thomas Jefferson', 'Shadwell', ' 3/4/1801'],
|
||||||
|
<String>['James Madison', 'Port Conway', ' 3/4/1809'],
|
||||||
|
<String>['James Monroe', 'Monroe Hall', ' 3/4/1817'],
|
||||||
|
<String>['Andrew Jackson', 'Waxhaws Region South/North', ' 3/4/1829'],
|
||||||
|
<String>['John Quincy Adams', 'Braintree', ' 3/4/1825'],
|
||||||
|
<String>['William Henry Harrison', 'Charles City County', ' 3/4/1841'],
|
||||||
|
<String>['Martin Van Buren', 'Kinderhook New', ' 3/4/1837'],
|
||||||
|
<String>['Zachary Taylor', 'Barboursville', ' 3/4/1849'],
|
||||||
|
<String>['John Tyler', 'Charles City County', ' 4/4/1841'],
|
||||||
|
<String>['James Buchanan', 'Cove Gap', ' 3/4/1857'],
|
||||||
|
<String>['James K. Polk', 'Pineville North', ' 3/4/1845'],
|
||||||
|
<String>['Millard Fillmore', 'Summerhill New', '7/9/1850'],
|
||||||
|
<String>['Franklin Pierce', 'Hillsborough New', ' 3/4/1853'],
|
||||||
|
<String>['Andrew Johnson', 'Raleigh North', ' 4/15/1865'],
|
||||||
|
<String>['Abraham Lincoln', 'Sinking Spring', ' 3/4/1861'],
|
||||||
|
<String>['Ulysses S. Grant', 'Point Pleasant', ' 3/4/1869'],
|
||||||
|
<String>['Rutherford B. Hayes', 'Delaware', ' 3/4/1877'],
|
||||||
|
<String>['Chester A. Arthur', 'Fairfield', ' 9/19/1881'],
|
||||||
|
<String>['James A. Garfield', 'Moreland Hills', ' 3/4/1881'],
|
||||||
|
<String>['Benjamin Harrison', 'North Bend', ' 3/4/1889'],
|
||||||
|
<String>['Grover Cleveland', 'Caldwell New', ' 3/4/1885'],
|
||||||
|
<String>['William McKinley', 'Niles', ' 3/4/1897'],
|
||||||
|
<String>['Woodrow Wilson', 'Staunton', ' 3/4/1913'],
|
||||||
|
<String>['William H. Taft', 'Cincinnati', ' 3/4/1909'],
|
||||||
|
<String>['Theodore Roosevelt', 'New York City New', ' 9/14/1901'],
|
||||||
|
<String>['Warren G. Harding', 'Blooming Grove', ' 3/4/1921'],
|
||||||
|
<String>['Calvin Coolidge', 'Plymouth', '8/2/1923'],
|
||||||
|
<String>['Herbert Hoover', 'West Branch', ' 3/4/1929'],
|
||||||
|
<String>['Franklin D. Roosevelt', 'Hyde Park New', ' 3/4/1933'],
|
||||||
|
<String>['Harry S. Truman', 'Lamar', ' 4/12/1945'],
|
||||||
|
<String>['Dwight D. Eisenhower', 'Denison', ' 1/20/1953'],
|
||||||
|
<String>['Lyndon B. Johnson', 'Stonewall', '11/22/1963'],
|
||||||
|
<String>['Ronald Reagan', 'Tampico', ' 1/20/1981'],
|
||||||
|
<String>['Richard Nixon', 'Yorba Linda', ' 1/20/1969'],
|
||||||
|
<String>['Gerald Ford', 'Omaha', 'August 9/1974'],
|
||||||
|
<String>['John F. Kennedy', 'Brookline', ' 1/20/1961'],
|
||||||
|
<String>['George H. W. Bush', 'Milton', ' 1/20/1989'],
|
||||||
|
<String>['Jimmy Carter', 'Plains', ' 1/20/1977'],
|
||||||
|
<String>['George W. Bush', 'New Haven', ' 1/20, 2001'],
|
||||||
|
<String>['Bill Clinton', 'Hope', ' 1/20/1993'],
|
||||||
|
<String>['Barack Obama', 'Honolulu', ' 1/20/2009'],
|
||||||
|
<String>['Donald J. Trump', 'New York City', ' 1/20/2017'],
|
||||||
|
];
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
name: cupertino_controllers_example
|
||||||
|
description: Demonstrates how to use the cupertino_controllers plugin.
|
||||||
|
publish_to: 'none'
|
||||||
|
|
||||||
|
environment:
|
||||||
|
sdk: ">=2.1.0 <3.0.0"
|
||||||
|
|
||||||
|
dependencies:
|
||||||
|
flutter:
|
||||||
|
sdk: flutter
|
||||||
|
|
||||||
|
# The following adds the Cupertino Icons font to your application.
|
||||||
|
# Use with the CupertinoIcons class for iOS style icons.
|
||||||
|
cupertino_icons: ^0.1.2
|
||||||
|
|
||||||
|
dev_dependencies:
|
||||||
|
flutter_test:
|
||||||
|
sdk: flutter
|
||||||
|
|
||||||
|
cupertino_controllers:
|
||||||
|
path: ../
|
||||||
|
|
||||||
|
# For information on the generic Dart part of this file, see the
|
||||||
|
# following page: https://www.dartlang.org/tools/pub/pubspec
|
||||||
|
|
||||||
|
# The following section is specific to Flutter.
|
||||||
|
flutter:
|
||||||
|
|
||||||
|
# The following line ensures that the Material Icons font is
|
||||||
|
# included with your application, so that you can use the icons in
|
||||||
|
# the material Icons class.
|
||||||
|
uses-material-design: true
|
||||||
|
|
||||||
|
# To add assets to your application, add an assets section, like this:
|
||||||
|
# assets:
|
||||||
|
# - images/a_dot_burr.jpeg
|
||||||
|
# - images/a_dot_ham.jpeg
|
||||||
|
|
||||||
|
# An image asset can refer to one or more resolution-specific "variants", see
|
||||||
|
# https://flutter.io/assets-and-images/#resolution-aware.
|
||||||
|
|
||||||
|
# For details regarding adding assets from package dependencies, see
|
||||||
|
# https://flutter.io/assets-and-images/#from-packages
|
||||||
|
|
||||||
|
# To add custom fonts to your application, add a fonts section here,
|
||||||
|
# in this "flutter" section. Each entry in this list should have a
|
||||||
|
# "family" key with the font family name, and a "fonts" key with a
|
||||||
|
# list giving the asset and other descriptors for the font. For
|
||||||
|
# example:
|
||||||
|
# fonts:
|
||||||
|
# - family: Schyler
|
||||||
|
# fonts:
|
||||||
|
# - asset: fonts/Schyler-Regular.ttf
|
||||||
|
# - asset: fonts/Schyler-Italic.ttf
|
||||||
|
# style: italic
|
||||||
|
# - family: Trajan Pro
|
||||||
|
# fonts:
|
||||||
|
# - asset: fonts/TrajanPro.ttf
|
||||||
|
# - asset: fonts/TrajanPro_Bold.ttf
|
||||||
|
# weight: 700
|
||||||
|
#
|
||||||
|
# For details regarding fonts from package dependencies,
|
||||||
|
# see https://flutter.io/custom-fonts/#from-packages
|
||||||
|
Before Width: | Height: | Size: 917 B After Width: | Height: | Size: 917 B |
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 8.1 KiB |
@@ -0,0 +1,33 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<meta content="IE=Edge" http-equiv="X-UA-Compatible" />
|
||||||
|
<meta name="description" content="A new Flutter project." />
|
||||||
|
|
||||||
|
<!-- iOS meta tags & icons -->
|
||||||
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||||
|
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
|
||||||
|
<meta name="apple-mobile-web-app-title" content="example" />
|
||||||
|
<link rel="apple-touch-icon" href="icons/Icon-192.png" />
|
||||||
|
|
||||||
|
<!-- Favicon -->
|
||||||
|
<link rel="icon" type="image/png" href="favicon.png" />
|
||||||
|
|
||||||
|
<title>example</title>
|
||||||
|
<link rel="manifest" href="manifest.json" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<!-- This script installs service_worker.js to provide PWA functionality to
|
||||||
|
application. For more information, see:
|
||||||
|
https://developers.google.com/web/fundamentals/primers/service-workers -->
|
||||||
|
<script>
|
||||||
|
if ("serviceWorker" in navigator) {
|
||||||
|
window.addEventListener("flutter-first-frame", function () {
|
||||||
|
navigator.serviceWorker.register("flutter_service_worker.js");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<script src="main.dart.js" type="application/javascript"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"name": "example",
|
||||||
|
"short_name": "example",
|
||||||
|
"start_url": ".",
|
||||||
|
"display": "standalone",
|
||||||
|
"background_color": "#0175C2",
|
||||||
|
"theme_color": "#0175C2",
|
||||||
|
"description": "A new Flutter project.",
|
||||||
|
"orientation": "portrait-primary",
|
||||||
|
"prefer_related_applications": false,
|
||||||
|
"icons": [
|
||||||
|
{
|
||||||
|
"src": "icons/Icon-192.png",
|
||||||
|
"sizes": "192x192",
|
||||||
|
"type": "image/png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "icons/Icon-512.png",
|
||||||
|
"sizes": "512x512",
|
||||||
|
"type": "image/png"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
export 'master_detail_controller/controller.dart';
|
||||||
|
export 'table_view_controller/cell.dart';
|
||||||
|
export 'table_view_controller/controller.dart';
|
||||||
|
export 'widgets/search.dart';
|
||||||
@@ -0,0 +1,138 @@
|
|||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
typedef ItemWidgetBuilder = Widget Function(
|
||||||
|
BuildContext context, dynamic item, bool tablet);
|
||||||
|
typedef IndexedWidgetBuilder = Widget Function(BuildContext context, int index);
|
||||||
|
|
||||||
|
class CupertinoMasterDetailController extends StatelessWidget {
|
||||||
|
final ItemWidgetBuilder detailBuilder;
|
||||||
|
final IndexedWidgetBuilder itemBuilder;
|
||||||
|
final Widget? onNull, onEmpty;
|
||||||
|
final PreferredSizeWidget? appBar;
|
||||||
|
final dynamic selectedItem;
|
||||||
|
final ValueChanged<dynamic> itemSelected;
|
||||||
|
final List<dynamic> items;
|
||||||
|
|
||||||
|
CupertinoMasterDetailController({
|
||||||
|
required this.detailBuilder,
|
||||||
|
required this.selectedItem,
|
||||||
|
required this.itemSelected,
|
||||||
|
required this.itemBuilder,
|
||||||
|
required this.items,
|
||||||
|
this.appBar,
|
||||||
|
this.onNull,
|
||||||
|
this.onEmpty,
|
||||||
|
});
|
||||||
|
|
||||||
|
Widget _buildMobileLayout(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
body: CupertinoPageScaffold(
|
||||||
|
child: CustomScrollView(
|
||||||
|
semanticChildCount: items.length,
|
||||||
|
slivers: <Widget>[
|
||||||
|
CupertinoSliverNavigationBar(
|
||||||
|
largeTitle: Text("Presidents"),
|
||||||
|
),
|
||||||
|
_ItemListing(
|
||||||
|
onEmpty: onEmpty,
|
||||||
|
onNull: onNull,
|
||||||
|
itemBuilder: itemBuilder,
|
||||||
|
items: items,
|
||||||
|
selectedItem: selectedItem,
|
||||||
|
itemSelectedCallback: (item) {
|
||||||
|
Navigator.push(
|
||||||
|
context,
|
||||||
|
MaterialPageRoute(
|
||||||
|
builder: (context) => detailBuilder(context, item, false)),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
])));
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buildTabletLayout(BuildContext context) {
|
||||||
|
return OrientationBuilder(builder: (context, orientation) {
|
||||||
|
return Row(
|
||||||
|
children: <Widget>[
|
||||||
|
Flexible(
|
||||||
|
flex: orientation == Orientation.landscape ? 1 : 2,
|
||||||
|
child: Scaffold(
|
||||||
|
appBar: appBar,
|
||||||
|
body: CustomScrollView(slivers: [
|
||||||
|
_ItemListing(
|
||||||
|
onEmpty: onEmpty,
|
||||||
|
onNull: onNull,
|
||||||
|
itemBuilder: itemBuilder,
|
||||||
|
items: items,
|
||||||
|
selectedItem: selectedItem,
|
||||||
|
itemSelectedCallback: itemSelected,
|
||||||
|
),
|
||||||
|
])),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
width: 1.0,
|
||||||
|
color: Colors.grey[300],
|
||||||
|
),
|
||||||
|
Flexible(
|
||||||
|
flex: 3,
|
||||||
|
child: detailBuilder(context, selectedItem, true),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
var shortestSide = MediaQuery.of(context).size.shortestSide;
|
||||||
|
final bool useMobileLayout = shortestSide < 600;
|
||||||
|
|
||||||
|
if (useMobileLayout) {
|
||||||
|
return _buildMobileLayout(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
return _buildTabletLayout(context);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class _ItemListing extends StatelessWidget {
|
||||||
|
_ItemListing({
|
||||||
|
required this.itemSelectedCallback,
|
||||||
|
this.selectedItem,
|
||||||
|
this.itemBuilder,
|
||||||
|
this.items,
|
||||||
|
this.onNull,
|
||||||
|
this.onEmpty,
|
||||||
|
});
|
||||||
|
|
||||||
|
final ValueChanged<dynamic> itemSelectedCallback;
|
||||||
|
final dynamic selectedItem;
|
||||||
|
final IndexedWidgetBuilder? itemBuilder;
|
||||||
|
final List<dynamic>? items;
|
||||||
|
final Widget? onNull, onEmpty;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
if (items == null) {
|
||||||
|
return onNull ?? Center(child: CircularProgressIndicator());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (items!.isEmpty) {
|
||||||
|
return onEmpty ?? Center(child: Text("No Items Found"));
|
||||||
|
}
|
||||||
|
|
||||||
|
return SliverList(
|
||||||
|
delegate: SliverChildBuilderDelegate(
|
||||||
|
(BuildContext context, int index) {
|
||||||
|
final _child = itemBuilder!(context, index);
|
||||||
|
return GestureDetector(
|
||||||
|
onTap: () => itemSelectedCallback(items![index]),
|
||||||
|
child: _child,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
childCount: items!.length,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,337 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_slidable/flutter_slidable.dart' as slidable;
|
||||||
|
|
||||||
|
import 'templates/avatar_tile.dart';
|
||||||
|
import 'templates/base_tile.dart';
|
||||||
|
import 'templates/basic_tile.dart';
|
||||||
|
import 'templates/phone_tile.dart';
|
||||||
|
|
||||||
|
class CupertinoTableCell extends StatelessWidget {
|
||||||
|
final bool selected;
|
||||||
|
final bool editing;
|
||||||
|
final bool canEdit;
|
||||||
|
final bool canDelete;
|
||||||
|
final bool lastItem;
|
||||||
|
final Widget? child;
|
||||||
|
final String id;
|
||||||
|
final VoidCallback? onDelete, onTap;
|
||||||
|
final List<slidable.IconSlideAction>? leadingActions, trailingActions;
|
||||||
|
final ValueChanged<bool>? onSelected;
|
||||||
|
|
||||||
|
// -- Styling --
|
||||||
|
final CupertinoAccessory accessory;
|
||||||
|
final VoidCallback? accessoryTap;
|
||||||
|
final CupertinoEditingAction editingAction;
|
||||||
|
final CupertinoEditingAccessory editingAccessory;
|
||||||
|
final VoidCallback? editingAccessoryTap;
|
||||||
|
|
||||||
|
const CupertinoTableCell({
|
||||||
|
Key? key,
|
||||||
|
this.selected = false,
|
||||||
|
this.canEdit = true,
|
||||||
|
this.canDelete = true,
|
||||||
|
this.editing = false,
|
||||||
|
this.lastItem = false,
|
||||||
|
this.trailingActions,
|
||||||
|
this.leadingActions,
|
||||||
|
this.onTap,
|
||||||
|
this.child,
|
||||||
|
required this.id,
|
||||||
|
this.onDelete,
|
||||||
|
this.onSelected,
|
||||||
|
this.accessory = CupertinoAccessory.disclosureIndicator,
|
||||||
|
this.accessoryTap,
|
||||||
|
this.editingAccessoryTap,
|
||||||
|
this.editingAccessory = CupertinoEditingAccessory.none,
|
||||||
|
this.editingAction = CupertinoEditingAction.select,
|
||||||
|
}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
Widget _child;
|
||||||
|
// CupertinoListTile _item = cell?.data as CupertinoListTile;
|
||||||
|
|
||||||
|
final CupertinoListTileData _ios = CupertinoListTileData(
|
||||||
|
hideLeadingIcon: true,
|
||||||
|
style: CupertinoCellStyle.custom,
|
||||||
|
accessory: accessory,
|
||||||
|
editingAction: editingAction,
|
||||||
|
editingAccessory: editingAccessory,
|
||||||
|
padding: null,
|
||||||
|
editingAccessoryTap: editingAccessoryTap,
|
||||||
|
accessoryTap: accessoryTap,
|
||||||
|
editingActionTap: () {
|
||||||
|
switch (editingAction) {
|
||||||
|
case CupertinoEditingAction.remove:
|
||||||
|
onDelete!();
|
||||||
|
break;
|
||||||
|
case CupertinoEditingAction.select:
|
||||||
|
onSelected!(!selected);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
}
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
switch (editingAction) {
|
||||||
|
case CupertinoEditingAction.select:
|
||||||
|
_child = GestureDetector(
|
||||||
|
onTapDown: (TapDownDetails details) {
|
||||||
|
if (!editing) {
|
||||||
|
print("On Tap Down..");
|
||||||
|
onSelected!(true);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onTapCancel: () {
|
||||||
|
if (!editing) {
|
||||||
|
print("On Tap Cancel..");
|
||||||
|
onSelected!(false);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
child: CupertinoListTile(
|
||||||
|
editing: editing,
|
||||||
|
selected: selected,
|
||||||
|
child: child,
|
||||||
|
ios: _ios,
|
||||||
|
lastItem: lastItem,
|
||||||
|
onTap: () {
|
||||||
|
if (!editing) {
|
||||||
|
onSelected!(false);
|
||||||
|
onTap!();
|
||||||
|
} else {
|
||||||
|
print("On Tap Down..");
|
||||||
|
onSelected!(!selected);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
case CupertinoEditingAction.remove:
|
||||||
|
_child = GestureDetector(
|
||||||
|
onTapDown: (TapDownDetails details) {
|
||||||
|
if (!editing) {
|
||||||
|
onSelected!(true);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onTapCancel: () {
|
||||||
|
if (!editing) {
|
||||||
|
onSelected!(false);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
child: CupertinoListTile(
|
||||||
|
editing: editing,
|
||||||
|
selected: selected,
|
||||||
|
child: child,
|
||||||
|
ios: _ios,
|
||||||
|
lastItem: lastItem,
|
||||||
|
onTap: () {
|
||||||
|
if (!editing) {
|
||||||
|
print("Item Tapped...");
|
||||||
|
onSelected!(false);
|
||||||
|
onTap!();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
_child = CupertinoListTile(
|
||||||
|
editing: editing,
|
||||||
|
selected: selected,
|
||||||
|
child: child,
|
||||||
|
ios: _ios,
|
||||||
|
lastItem: lastItem,
|
||||||
|
onTap: () {
|
||||||
|
if (!editing) {
|
||||||
|
print("Item Tapped...");
|
||||||
|
onSelected!(false);
|
||||||
|
onTap!();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
final List<Widget> _trailingActions = <Widget>[];
|
||||||
|
|
||||||
|
if (trailingActions != null) {
|
||||||
|
_trailingActions..addAll(trailingActions!);
|
||||||
|
}
|
||||||
|
|
||||||
|
_trailingActions.add(
|
||||||
|
slidable.IconSlideAction(
|
||||||
|
caption: 'Delete',
|
||||||
|
color: Colors.red,
|
||||||
|
icon: Icons.delete,
|
||||||
|
onTap: onDelete!,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
return slidable.Slidable(
|
||||||
|
key: key,
|
||||||
|
actionPane: slidable.SlidableDrawerActionPane(),
|
||||||
|
actionExtentRatio: 0.25,
|
||||||
|
child: _child,
|
||||||
|
actions: leadingActions,
|
||||||
|
secondaryActions: _trailingActions,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class CupertinoListTile extends StatelessWidget {
|
||||||
|
final Text? subtitle, title, id;
|
||||||
|
final Widget? avatar, child;
|
||||||
|
final List<Widget>? trailing;
|
||||||
|
final IconData? leading;
|
||||||
|
final CupertinoListTileData? ios;
|
||||||
|
final VoidCallback? onTap, onLongPressed;
|
||||||
|
final bool selected, editing;
|
||||||
|
final bool lastItem;
|
||||||
|
|
||||||
|
CupertinoListTile({
|
||||||
|
this.title,
|
||||||
|
this.id,
|
||||||
|
this.subtitle,
|
||||||
|
this.leading,
|
||||||
|
this.trailing,
|
||||||
|
this.avatar,
|
||||||
|
this.onTap,
|
||||||
|
this.onLongPressed,
|
||||||
|
this.ios,
|
||||||
|
this.child,
|
||||||
|
this.lastItem = true,
|
||||||
|
this.selected = false,
|
||||||
|
this.editing = false,
|
||||||
|
});
|
||||||
|
// : assert(ios?.style == CupertinoCellStyle.custom && child != null);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
Widget _child = Container();
|
||||||
|
|
||||||
|
switch (ios?.style ?? CupertinoCellStyle.custom) {
|
||||||
|
case CupertinoCellStyle.avatarDetail:
|
||||||
|
_child = CupertinoAvatarListTile(
|
||||||
|
avatar: avatar,
|
||||||
|
title: title?.data,
|
||||||
|
subtitle: subtitle?.data,
|
||||||
|
actions: trailing,
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
case CupertinoCellStyle.subtitle:
|
||||||
|
_child = CupertinoPhoneListTile(
|
||||||
|
title: title?.data,
|
||||||
|
subtitle: subtitle?.data,
|
||||||
|
actions: trailing,
|
||||||
|
icon: leading,
|
||||||
|
hideLeadingIcon: ios?.hideLeadingIcon,
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
case CupertinoCellStyle.basic:
|
||||||
|
_child = CupertinoTextMenu(
|
||||||
|
children: <Widget?>[title]..addAll(trailing ?? []),
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case CupertinoCellStyle.leftDetail:
|
||||||
|
_child = Row(
|
||||||
|
children: <Widget>[
|
||||||
|
...[subtitle ?? Container()],
|
||||||
|
...[title ?? Container()],
|
||||||
|
],
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
case CupertinoCellStyle.rightDetail:
|
||||||
|
_child = CupertinoTextMenu(
|
||||||
|
children: <Widget?>[title, subtitle],
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
case CupertinoCellStyle.custom:
|
||||||
|
_child = child ?? Container();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
final Widget _row = CupertinoBaseTile(
|
||||||
|
selected: selected,
|
||||||
|
onTap: onTap,
|
||||||
|
onLongPressed: onLongPressed,
|
||||||
|
accessory: ios?.accessory,
|
||||||
|
editing: editing,
|
||||||
|
editingAccessory: ios?.editingAccessory,
|
||||||
|
editingAction: ios?.editingAction,
|
||||||
|
accessoryTap: ios?.accessoryTap,
|
||||||
|
editingAccessoryTap: ios?.editingAccessoryTap,
|
||||||
|
editingActionTap: ios?.editingActionTap,
|
||||||
|
child: _child,
|
||||||
|
padding: ios?.padding,
|
||||||
|
);
|
||||||
|
|
||||||
|
if (lastItem) {
|
||||||
|
return _row;
|
||||||
|
}
|
||||||
|
|
||||||
|
return Column(
|
||||||
|
children: <Widget>[
|
||||||
|
_row,
|
||||||
|
Container(
|
||||||
|
height: 1.0,
|
||||||
|
color: const Color(0xFFD9D9D9),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class CupertinoListTileData {
|
||||||
|
final CupertinoCellStyle style;
|
||||||
|
final CupertinoEditingAction editingAction;
|
||||||
|
final CupertinoEditingAccessory editingAccessory;
|
||||||
|
final CupertinoAccessory accessory;
|
||||||
|
final VoidCallback? accessoryTap, editingAccessoryTap, editingActionTap;
|
||||||
|
final bool hideLeadingIcon, enableReorder;
|
||||||
|
final EdgeInsets? padding;
|
||||||
|
|
||||||
|
CupertinoListTileData({
|
||||||
|
this.style = CupertinoCellStyle.custom,
|
||||||
|
this.accessory = CupertinoAccessory.none,
|
||||||
|
this.editingAccessory = CupertinoEditingAccessory.none,
|
||||||
|
this.editingAction = CupertinoEditingAction.remove,
|
||||||
|
this.accessoryTap,
|
||||||
|
this.hideLeadingIcon = false,
|
||||||
|
this.enableReorder = true,
|
||||||
|
this.editingAccessoryTap,
|
||||||
|
this.editingActionTap,
|
||||||
|
this.padding = const EdgeInsets.only(left: 8.0, bottom: 8.0, top: 8.0),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
enum CupertinoCellStyle {
|
||||||
|
basic,
|
||||||
|
rightDetail,
|
||||||
|
leftDetail,
|
||||||
|
subtitle,
|
||||||
|
avatarDetail,
|
||||||
|
custom,
|
||||||
|
}
|
||||||
|
|
||||||
|
enum CupertinoEditingAction {
|
||||||
|
none,
|
||||||
|
remove,
|
||||||
|
select,
|
||||||
|
}
|
||||||
|
|
||||||
|
enum CupertinoAccessory {
|
||||||
|
none,
|
||||||
|
disclosureIndicator,
|
||||||
|
detailDisclosure,
|
||||||
|
checkmark,
|
||||||
|
detail
|
||||||
|
}
|
||||||
|
|
||||||
|
enum CupertinoEditingAccessory {
|
||||||
|
none,
|
||||||
|
disclosureIndicator,
|
||||||
|
detailDisclosure,
|
||||||
|
checkmark,
|
||||||
|
detail,
|
||||||
|
dragHandle
|
||||||
|
}
|
||||||
@@ -0,0 +1,220 @@
|
|||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_sticky_header/flutter_sticky_header.dart';
|
||||||
|
|
||||||
|
typedef RefreshCallback = Future<void> Function();
|
||||||
|
|
||||||
|
class CupertinoTableViewController extends StatelessWidget {
|
||||||
|
final String? title, previousTitle;
|
||||||
|
final Widget? leading, trailing;
|
||||||
|
final ValueChanged<bool>? onEditing;
|
||||||
|
final RefreshCallback? onRefresh;
|
||||||
|
final bool showEditingButtonLeft, showEditingButtonRight, hideAppBarOnSearch;
|
||||||
|
final bool isEditing, isSearching;
|
||||||
|
final List<CupertinoTableViewSection> sections;
|
||||||
|
final List<Widget>? widgets, toolbarButtons;
|
||||||
|
|
||||||
|
CupertinoTableViewController({
|
||||||
|
this.previousTitle,
|
||||||
|
this.title,
|
||||||
|
this.trailing,
|
||||||
|
this.leading,
|
||||||
|
this.onRefresh,
|
||||||
|
this.hideAppBarOnSearch = false,
|
||||||
|
this.isSearching = false,
|
||||||
|
this.isEditing = false,
|
||||||
|
this.onEditing,
|
||||||
|
List<Widget> children = const <Widget>[],
|
||||||
|
this.widgets,
|
||||||
|
this.showEditingButtonLeft = true,
|
||||||
|
this.showEditingButtonRight = false,
|
||||||
|
this.toolbarButtons,
|
||||||
|
}) : sections = [CupertinoTableViewSection(children: children)],
|
||||||
|
assert(showEditingButtonLeft != showEditingButtonRight);
|
||||||
|
|
||||||
|
CupertinoTableViewController.builder({
|
||||||
|
// this.item,
|
||||||
|
|
||||||
|
this.previousTitle,
|
||||||
|
this.title,
|
||||||
|
this.trailing,
|
||||||
|
this.leading,
|
||||||
|
this.onRefresh,
|
||||||
|
this.hideAppBarOnSearch = false,
|
||||||
|
this.isSearching = false,
|
||||||
|
this.isEditing = false,
|
||||||
|
this.onEditing,
|
||||||
|
required IndexedWidgetBuilder itemBuilder,
|
||||||
|
int? itemCount,
|
||||||
|
this.widgets,
|
||||||
|
this.showEditingButtonLeft = true,
|
||||||
|
this.showEditingButtonRight = false,
|
||||||
|
this.toolbarButtons,
|
||||||
|
}) : sections = [
|
||||||
|
CupertinoTableViewSection.builder(
|
||||||
|
itemBuilder: itemBuilder,
|
||||||
|
itemCount: itemCount,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
assert(showEditingButtonLeft != showEditingButtonRight);
|
||||||
|
|
||||||
|
const CupertinoTableViewController.sectioned({
|
||||||
|
this.previousTitle,
|
||||||
|
this.title,
|
||||||
|
this.trailing,
|
||||||
|
this.hideAppBarOnSearch = false,
|
||||||
|
this.leading,
|
||||||
|
this.onRefresh,
|
||||||
|
this.isSearching = false,
|
||||||
|
this.isEditing = false,
|
||||||
|
this.onEditing,
|
||||||
|
this.showEditingButtonLeft = true,
|
||||||
|
this.showEditingButtonRight = false,
|
||||||
|
this.toolbarButtons,
|
||||||
|
required this.sections,
|
||||||
|
this.widgets,
|
||||||
|
}) : assert(showEditingButtonLeft != showEditingButtonRight);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final _editingButton = Container(
|
||||||
|
padding: EdgeInsets.only(top: 10.0),
|
||||||
|
child: CupertinoTableViewEditingButton(
|
||||||
|
isEditing: isEditing,
|
||||||
|
onPressed: () => onEditing!(!isEditing),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
final _searchNavBar = <Widget>[];
|
||||||
|
|
||||||
|
if (!isSearching && hideAppBarOnSearch) {
|
||||||
|
_searchNavBar.addAll([
|
||||||
|
CupertinoSliverNavigationBar(
|
||||||
|
// heroTag: title ?? "Title",
|
||||||
|
// transitionBetweenRoutes: false,
|
||||||
|
largeTitle: Text(title ?? "Title"),
|
||||||
|
// We're specifying a back label here because the previous page
|
||||||
|
// is a Material page. CupertinoPageRoutes could auto-populate
|
||||||
|
// these back labels.
|
||||||
|
previousPageTitle: previousTitle ?? "",
|
||||||
|
leading: showEditingButtonLeft ? _editingButton : leading,
|
||||||
|
trailing: showEditingButtonRight ? _editingButton : trailing,
|
||||||
|
),
|
||||||
|
CupertinoSliverRefreshControl(onRefresh: onRefresh),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
final _widgets = <Widget>[];
|
||||||
|
|
||||||
|
if (widgets != null) {
|
||||||
|
for (Widget _widget in widgets!) {
|
||||||
|
_widgets.add(SliverToBoxAdapter(child: _widget));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
final _sections = <Widget>[];
|
||||||
|
|
||||||
|
int _index = 0;
|
||||||
|
for (CupertinoTableViewSection _section in sections) {
|
||||||
|
_sections.add(new SliverStickyHeader(
|
||||||
|
header: _section.header == null
|
||||||
|
? null
|
||||||
|
: new Container(
|
||||||
|
color: CupertinoColors.lightBackgroundGray,
|
||||||
|
padding:
|
||||||
|
const EdgeInsets.symmetric(horizontal: 16.0, vertical: 5.0),
|
||||||
|
alignment: Alignment.centerLeft,
|
||||||
|
child: _section.header,
|
||||||
|
),
|
||||||
|
sliver: SliverSafeArea(
|
||||||
|
top: false,
|
||||||
|
bottom: sections.length == _index + 1,
|
||||||
|
sliver: SliverList(
|
||||||
|
delegate: _section.childrenDelegate,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
));
|
||||||
|
_index++;
|
||||||
|
}
|
||||||
|
|
||||||
|
return DefaultTextStyle(
|
||||||
|
style: Theme.of(context).textTheme.title!,
|
||||||
|
child: Scaffold(
|
||||||
|
body: CustomScrollView(
|
||||||
|
primary: true,
|
||||||
|
slivers: [
|
||||||
|
..._searchNavBar,
|
||||||
|
..._widgets,
|
||||||
|
..._sections,
|
||||||
|
],
|
||||||
|
),
|
||||||
|
persistentFooterButtons: toolbarButtons,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class CupertinoTableViewEditingButton extends StatelessWidget {
|
||||||
|
final bool? isEditing;
|
||||||
|
final VoidCallback? onPressed;
|
||||||
|
|
||||||
|
const CupertinoTableViewEditingButton({
|
||||||
|
this.isEditing,
|
||||||
|
this.onPressed,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
if (isEditing!) {
|
||||||
|
return GestureDetector(
|
||||||
|
onTap: onPressed,
|
||||||
|
child: const Text("Cancel",
|
||||||
|
style: TextStyle(
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: CupertinoColors.activeBlue,
|
||||||
|
)),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return GestureDetector(
|
||||||
|
onTap: onPressed,
|
||||||
|
child: const Text("Edit",
|
||||||
|
style: TextStyle(
|
||||||
|
color: CupertinoColors.activeBlue,
|
||||||
|
)),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Todo; Seconts for Tableview
|
||||||
|
class CupertinoTableViewSection {
|
||||||
|
final Widget? header;
|
||||||
|
final SliverChildDelegate childrenDelegate;
|
||||||
|
|
||||||
|
CupertinoTableViewSection({
|
||||||
|
this.header,
|
||||||
|
List<Widget> children = const <Widget>[],
|
||||||
|
bool addAutomaticKeepAlives = true,
|
||||||
|
bool addRepaintBoundaries = true,
|
||||||
|
bool addSemanticIndexes = true,
|
||||||
|
}) : childrenDelegate = SliverChildListDelegate(
|
||||||
|
children,
|
||||||
|
addAutomaticKeepAlives: addAutomaticKeepAlives,
|
||||||
|
addRepaintBoundaries: addRepaintBoundaries,
|
||||||
|
addSemanticIndexes: addSemanticIndexes,
|
||||||
|
);
|
||||||
|
|
||||||
|
CupertinoTableViewSection.builder({
|
||||||
|
this.header,
|
||||||
|
required IndexedWidgetBuilder itemBuilder,
|
||||||
|
int? itemCount,
|
||||||
|
bool addAutomaticKeepAlives = true,
|
||||||
|
bool addRepaintBoundaries = true,
|
||||||
|
bool addSemanticIndexes = true,
|
||||||
|
}) : childrenDelegate = SliverChildBuilderDelegate(
|
||||||
|
itemBuilder,
|
||||||
|
childCount: itemCount,
|
||||||
|
addAutomaticKeepAlives: addAutomaticKeepAlives,
|
||||||
|
addRepaintBoundaries: addRepaintBoundaries,
|
||||||
|
addSemanticIndexes: addSemanticIndexes,
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
import '../../widgets/text.dart';
|
||||||
|
|
||||||
|
class CupertinoAvatarListTile extends StatelessWidget {
|
||||||
|
const CupertinoAvatarListTile({
|
||||||
|
required this.title,
|
||||||
|
this.subtitle,
|
||||||
|
this.actions,
|
||||||
|
this.avatar,
|
||||||
|
});
|
||||||
|
|
||||||
|
final Widget? avatar;
|
||||||
|
final String? title, subtitle;
|
||||||
|
final List<Widget>? actions;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final List<Widget> _widgets = <Widget>[
|
||||||
|
Container(
|
||||||
|
height: 60.0,
|
||||||
|
width: 60.0,
|
||||||
|
child: avatar,
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 12.0),
|
||||||
|
child: subtitle == null
|
||||||
|
? CupertinoText(title, type: CupertinoTextTheme.title)
|
||||||
|
: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: <Widget>[
|
||||||
|
CupertinoText(title, type: CupertinoTextTheme.title),
|
||||||
|
CupertinoText(subtitle, type: CupertinoTextTheme.subtitle),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
];
|
||||||
|
|
||||||
|
final Widget row = Container(
|
||||||
|
padding: const EdgeInsets.only(left: 8.0),
|
||||||
|
child: Row(
|
||||||
|
children: _widgets..addAll(actions ?? <Widget>[]),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
return row;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,206 @@
|
|||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
import '../cell.dart';
|
||||||
|
|
||||||
|
class CupertinoBaseTile extends StatelessWidget {
|
||||||
|
const CupertinoBaseTile({
|
||||||
|
this.selected = false,
|
||||||
|
this.editing = false,
|
||||||
|
required this.child,
|
||||||
|
this.accessory = CupertinoAccessory.none,
|
||||||
|
this.editingAccessory = CupertinoEditingAccessory.none,
|
||||||
|
this.editingAction = CupertinoEditingAction.remove,
|
||||||
|
this.accessoryTap,
|
||||||
|
this.onLongPressed,
|
||||||
|
this.onTap,
|
||||||
|
this.editingAccessoryTap,
|
||||||
|
this.editingActionTap,
|
||||||
|
this.padding,
|
||||||
|
});
|
||||||
|
|
||||||
|
final bool editing, selected;
|
||||||
|
final Widget child;
|
||||||
|
final EdgeInsets? padding;
|
||||||
|
final CupertinoEditingAction? editingAction;
|
||||||
|
final CupertinoEditingAccessory? editingAccessory;
|
||||||
|
final CupertinoAccessory? accessory;
|
||||||
|
final VoidCallback? accessoryTap,
|
||||||
|
onTap,
|
||||||
|
onLongPressed,
|
||||||
|
editingAccessoryTap,
|
||||||
|
editingActionTap;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final List<Widget> _widgets = <Widget>[];
|
||||||
|
|
||||||
|
if (editing) {
|
||||||
|
if (editingAccessory != null) {
|
||||||
|
switch (editingAccessory) {
|
||||||
|
case CupertinoEditingAccessory.disclosureIndicator:
|
||||||
|
_widgets
|
||||||
|
..add(
|
||||||
|
const Icon(CupertinoIcons.right_chevron),
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
case CupertinoEditingAccessory.detailDisclosure:
|
||||||
|
_widgets
|
||||||
|
..addAll([
|
||||||
|
IconButton(
|
||||||
|
icon: const Icon(CupertinoIcons.info,
|
||||||
|
color: CupertinoColors.activeBlue),
|
||||||
|
onPressed: editingAccessoryTap,
|
||||||
|
),
|
||||||
|
const Icon(CupertinoIcons.right_chevron),
|
||||||
|
]);
|
||||||
|
break;
|
||||||
|
case CupertinoEditingAccessory.detail:
|
||||||
|
_widgets
|
||||||
|
..add(
|
||||||
|
IconButton(
|
||||||
|
icon: const Icon(CupertinoIcons.info,
|
||||||
|
color: CupertinoColors.activeBlue),
|
||||||
|
onPressed: editingAccessoryTap,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
case CupertinoEditingAccessory.checkmark:
|
||||||
|
_widgets
|
||||||
|
..add(
|
||||||
|
const Icon(CupertinoIcons.check_mark),
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
case CupertinoEditingAccessory.dragHandle:
|
||||||
|
_widgets
|
||||||
|
..add(IconButton(
|
||||||
|
icon: const Icon(Icons.dehaze),
|
||||||
|
onPressed: () {},
|
||||||
|
));
|
||||||
|
break;
|
||||||
|
case null:
|
||||||
|
case CupertinoEditingAccessory.none:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (accessory != null)
|
||||||
|
switch (accessory) {
|
||||||
|
case CupertinoAccessory.disclosureIndicator:
|
||||||
|
_widgets..add(const Icon(CupertinoIcons.right_chevron));
|
||||||
|
break;
|
||||||
|
case CupertinoAccessory.detailDisclosure:
|
||||||
|
_widgets
|
||||||
|
..addAll([
|
||||||
|
IconButton(
|
||||||
|
icon: const Icon(CupertinoIcons.info),
|
||||||
|
onPressed: accessoryTap,
|
||||||
|
),
|
||||||
|
const Icon(CupertinoIcons.right_chevron),
|
||||||
|
]);
|
||||||
|
break;
|
||||||
|
case CupertinoAccessory.detail:
|
||||||
|
_widgets
|
||||||
|
..add(IconButton(
|
||||||
|
icon: const Icon(CupertinoIcons.info),
|
||||||
|
onPressed: accessoryTap,
|
||||||
|
));
|
||||||
|
break;
|
||||||
|
case CupertinoAccessory.checkmark:
|
||||||
|
_widgets..add(const Icon(CupertinoIcons.check_mark));
|
||||||
|
break;
|
||||||
|
case null:
|
||||||
|
case CupertinoAccessory.none:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget? _editingAction;
|
||||||
|
|
||||||
|
if (editingAction != null) {
|
||||||
|
switch (editingAction) {
|
||||||
|
case CupertinoEditingAction.remove:
|
||||||
|
_editingAction = Container(
|
||||||
|
height: 25.0,
|
||||||
|
width: 25.0,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.red,
|
||||||
|
borderRadius: BorderRadius.circular(25.0),
|
||||||
|
),
|
||||||
|
child: GestureDetector(
|
||||||
|
child: Icon(
|
||||||
|
Icons.remove,
|
||||||
|
color: CupertinoColors.white,
|
||||||
|
// size: 18.0,
|
||||||
|
),
|
||||||
|
onTap: editingActionTap,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
case CupertinoEditingAction.select:
|
||||||
|
_editingAction = Container(
|
||||||
|
height: 25.0,
|
||||||
|
width: 25.0,
|
||||||
|
decoration: selected
|
||||||
|
? BoxDecoration(
|
||||||
|
color: CupertinoColors.activeBlue,
|
||||||
|
borderRadius: BorderRadius.circular(25.0),
|
||||||
|
)
|
||||||
|
: new BoxDecoration(
|
||||||
|
border: new Border.all(
|
||||||
|
color: CupertinoColors.lightBackgroundGray),
|
||||||
|
shape: BoxShape.circle),
|
||||||
|
child: GestureDetector(
|
||||||
|
child: Icon(
|
||||||
|
CupertinoIcons.check_mark,
|
||||||
|
color: selected ? CupertinoColors.white : Colors.transparent,
|
||||||
|
),
|
||||||
|
onTap: editingActionTap,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
case null:
|
||||||
|
case CupertinoEditingAction.none:
|
||||||
|
_editingAction = null;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Color? _rowColor = Colors.transparent;
|
||||||
|
|
||||||
|
if (selected && editing) {
|
||||||
|
_rowColor = Colors.lightBlue[50];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!editing && selected) {
|
||||||
|
_rowColor = Colors.lightBlue[50];
|
||||||
|
}
|
||||||
|
|
||||||
|
final Widget row = GestureDetector(
|
||||||
|
behavior: HitTestBehavior.opaque,
|
||||||
|
onTap: onTap,
|
||||||
|
onLongPress: onLongPressed,
|
||||||
|
child: SafeArea(
|
||||||
|
top: false,
|
||||||
|
bottom: false,
|
||||||
|
child: Container(
|
||||||
|
color: _rowColor,
|
||||||
|
padding: padding,
|
||||||
|
child: Row(
|
||||||
|
children: <Widget>[
|
||||||
|
Container(
|
||||||
|
padding: editing && _editingAction != null
|
||||||
|
? const EdgeInsets.only(left: 12.0)
|
||||||
|
: null,
|
||||||
|
child: editing ? _editingAction : null,
|
||||||
|
),
|
||||||
|
Expanded(child: child),
|
||||||
|
]..addAll(_widgets),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
return row;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class CupertinoTextMenu extends StatelessWidget {
|
||||||
|
final bool lastItem;
|
||||||
|
final List<Widget?> children;
|
||||||
|
|
||||||
|
CupertinoTextMenu({
|
||||||
|
required this.children,
|
||||||
|
this.lastItem = false,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Container(
|
||||||
|
decoration: const BoxDecoration(
|
||||||
|
color: Colors.transparent,
|
||||||
|
border: Border(
|
||||||
|
top: BorderSide(color: Color(0xFFBCBBC1), width: 0.0),
|
||||||
|
bottom: BorderSide(color: Color(0xFFBCBBC1), width: 0.0),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
height: 44.0,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 16.0),
|
||||||
|
child: SafeArea(
|
||||||
|
top: false,
|
||||||
|
bottom: false,
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: children as List<Widget>,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,111 @@
|
|||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
import '../../widgets/text.dart';
|
||||||
|
|
||||||
|
class CupertinoPhoneListTile extends StatelessWidget {
|
||||||
|
final String? subtitle, title;
|
||||||
|
final List<Widget>? actions;
|
||||||
|
final IconData? icon;
|
||||||
|
final bool? hideLeadingIcon;
|
||||||
|
|
||||||
|
const CupertinoPhoneListTile({
|
||||||
|
this.actions,
|
||||||
|
this.subtitle,
|
||||||
|
required this.title,
|
||||||
|
this.icon,
|
||||||
|
this.hideLeadingIcon = true,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
Widget row;
|
||||||
|
if (subtitle == null) {
|
||||||
|
row = Container(
|
||||||
|
// color: selected ? Colors.grey[400] : Colors.transparent,
|
||||||
|
height: 40.0,
|
||||||
|
padding: EdgeInsets.only(top: subtitle == null ? 0.0 : 9.0),
|
||||||
|
child: Row(
|
||||||
|
children: <Widget>[
|
||||||
|
Container(
|
||||||
|
width: hideLeadingIcon! ? 12.0 : 38.0,
|
||||||
|
child: icon != null && !hideLeadingIcon!
|
||||||
|
? Align(
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: Icon(
|
||||||
|
icon,
|
||||||
|
color: CupertinoColors.inactiveGray,
|
||||||
|
size: 18.0,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
: null,
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
|
padding:
|
||||||
|
const EdgeInsets.only(left: 1.0, bottom: 0.0, right: 10.0),
|
||||||
|
child: Row(
|
||||||
|
children: <Widget>[
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: <Widget>[
|
||||||
|
CupertinoText(title, type: CupertinoTextTheme.title)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
]..addAll(actions ?? <Widget>[])),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
row = Container(
|
||||||
|
// color: selected ? Colors.grey[400] : Colors.transparent,
|
||||||
|
height: 60.0,
|
||||||
|
padding: const EdgeInsets.only(top: 9.0),
|
||||||
|
child: Row(
|
||||||
|
children: <Widget>[
|
||||||
|
Container(
|
||||||
|
width: hideLeadingIcon! ? 12.0 : 38.0,
|
||||||
|
child: icon != null && !hideLeadingIcon!
|
||||||
|
? Align(
|
||||||
|
alignment: Alignment.topCenter,
|
||||||
|
child: Icon(
|
||||||
|
icon,
|
||||||
|
color: CupertinoColors.inactiveGray,
|
||||||
|
size: 18.0,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
: null,
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
|
padding:
|
||||||
|
const EdgeInsets.only(left: 1.0, bottom: 9.0, right: 10.0),
|
||||||
|
child: Row(
|
||||||
|
children: <Widget>[
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: <Widget>[
|
||||||
|
CupertinoText(title, type: CupertinoTextTheme.title),
|
||||||
|
CupertinoText(subtitle,
|
||||||
|
type: CupertinoTextTheme.subtitle),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
]..addAll(actions ?? <Widget>[])),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return row;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,149 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
|
||||||
|
class CupertinoSearchBar extends AnimatedWidget {
|
||||||
|
const CupertinoSearchBar({
|
||||||
|
Key? key,
|
||||||
|
required this.controller,
|
||||||
|
required this.focusNode,
|
||||||
|
this.onCancel,
|
||||||
|
this.onChanged,
|
||||||
|
this.onSubmitted,
|
||||||
|
this.autoFocus = false,
|
||||||
|
required this.animation,
|
||||||
|
this.onClear,
|
||||||
|
this.enabled = true,
|
||||||
|
this.autoCorrect = true,
|
||||||
|
}) : assert(controller != null),
|
||||||
|
assert(focusNode != null),
|
||||||
|
super(key: key, listenable: animation);
|
||||||
|
|
||||||
|
final TextEditingController controller;
|
||||||
|
final FocusNode focusNode;
|
||||||
|
final ValueChanged<String>? onChanged, onSubmitted;
|
||||||
|
final VoidCallback? onCancel, onClear;
|
||||||
|
final bool autoFocus, enabled, autoCorrect;
|
||||||
|
final Animation<double> animation;
|
||||||
|
|
||||||
|
static final _opacityTween = new Tween(begin: 1.0, end: 0.0);
|
||||||
|
static final _paddingTween = new Tween(begin: 0.0, end: 60.0);
|
||||||
|
static final _kFontSize = 13.0;
|
||||||
|
// static final Key _inputKey = new Key(debugLabel: 'searchBox');
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
// if (!widget.alwaysShowAppBar)
|
||||||
|
// FocusScope.of(context).requestFocus(_searchFocusNode);
|
||||||
|
|
||||||
|
return new Padding(
|
||||||
|
padding: const EdgeInsets.fromLTRB(10.0, 0.0, 20.0, 0.0),
|
||||||
|
child: new Row(
|
||||||
|
children: <Widget>[
|
||||||
|
new Expanded(
|
||||||
|
child: new Container(
|
||||||
|
padding:
|
||||||
|
const EdgeInsets.symmetric(horizontal: 8.0, vertical: 6.0),
|
||||||
|
decoration: new BoxDecoration(
|
||||||
|
color: CupertinoColors.lightBackgroundGray,
|
||||||
|
border:
|
||||||
|
new Border.all(width: 0.0, color: CupertinoColors.white),
|
||||||
|
borderRadius: new BorderRadius.circular(10.0),
|
||||||
|
),
|
||||||
|
child: new Stack(
|
||||||
|
alignment: Alignment.centerLeft,
|
||||||
|
children: <Widget>[
|
||||||
|
new Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: <Widget>[
|
||||||
|
new Padding(
|
||||||
|
padding: const EdgeInsets.fromLTRB(0.0, 0.0, 4.0, 1.0),
|
||||||
|
child: new Icon(
|
||||||
|
CupertinoIcons.search,
|
||||||
|
color: CupertinoColors.inactiveGray,
|
||||||
|
size: _kFontSize + 2.0,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
new Text(
|
||||||
|
'Search',
|
||||||
|
style: new TextStyle(
|
||||||
|
inherit: false,
|
||||||
|
color: CupertinoColors.inactiveGray
|
||||||
|
.withOpacity(_opacityTween.evaluate(animation)),
|
||||||
|
fontSize: _kFontSize,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
new Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: <Widget>[
|
||||||
|
new Expanded(
|
||||||
|
child: new Padding(
|
||||||
|
padding: const EdgeInsets.only(left: 20.0),
|
||||||
|
child: enabled
|
||||||
|
? new EditableText(
|
||||||
|
key: Key("Search_Input_Box"),
|
||||||
|
controller: controller,
|
||||||
|
focusNode: focusNode,
|
||||||
|
onChanged: onChanged,
|
||||||
|
autofocus: autoFocus,
|
||||||
|
onSubmitted: onSubmitted,
|
||||||
|
style: new TextStyle(
|
||||||
|
color: CupertinoColors.black,
|
||||||
|
inherit: false,
|
||||||
|
fontSize: _kFontSize,
|
||||||
|
),
|
||||||
|
autocorrect: autoCorrect,
|
||||||
|
cursorColor: CupertinoColors.black,
|
||||||
|
backgroundCursorColor: Colors.grey,
|
||||||
|
)
|
||||||
|
: null,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
new CupertinoButton(
|
||||||
|
minSize: 10.0,
|
||||||
|
padding: const EdgeInsets.all(1.0),
|
||||||
|
borderRadius: new BorderRadius.circular(30.0),
|
||||||
|
color: CupertinoColors.inactiveGray.withOpacity(
|
||||||
|
1.0 - _opacityTween.evaluate(animation),
|
||||||
|
),
|
||||||
|
child: new Icon(
|
||||||
|
Icons.close,
|
||||||
|
size: 8.0,
|
||||||
|
color: CupertinoColors.white,
|
||||||
|
),
|
||||||
|
onPressed: () {
|
||||||
|
if (animation.isDismissed)
|
||||||
|
return;
|
||||||
|
else
|
||||||
|
onClear!();
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
new SizedBox(
|
||||||
|
width: _paddingTween.evaluate(animation),
|
||||||
|
child: new CupertinoButton(
|
||||||
|
padding: const EdgeInsets.only(left: 8.0),
|
||||||
|
onPressed: onCancel,
|
||||||
|
child: new Text(
|
||||||
|
'Cancel',
|
||||||
|
softWrap: false,
|
||||||
|
style: new TextStyle(
|
||||||
|
inherit: false,
|
||||||
|
color: CupertinoColors.activeBlue,
|
||||||
|
fontSize: _kFontSize,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
|
||||||
|
enum CupertinoTextTheme { title, subtitle, detail, custom }
|
||||||
|
|
||||||
|
class CupertinoText extends StatelessWidget {
|
||||||
|
final String? data;
|
||||||
|
final TextStyle? style;
|
||||||
|
final int maxLines;
|
||||||
|
final CupertinoTextTheme type;
|
||||||
|
|
||||||
|
const CupertinoText(
|
||||||
|
this.data, {
|
||||||
|
Key? key,
|
||||||
|
this.style,
|
||||||
|
this.maxLines = 1,
|
||||||
|
this.type = CupertinoTextTheme.detail,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
switch (type) {
|
||||||
|
case CupertinoTextTheme.title:
|
||||||
|
return Text(
|
||||||
|
data!,
|
||||||
|
maxLines: 1,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
style: const TextStyle(
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
letterSpacing: -0.18,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
case CupertinoTextTheme.subtitle:
|
||||||
|
return Text(
|
||||||
|
data!,
|
||||||
|
maxLines: 1,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
style: const TextStyle(
|
||||||
|
fontSize: 15.0,
|
||||||
|
letterSpacing: -0.24,
|
||||||
|
color: CupertinoColors.inactiveGray,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
case CupertinoTextTheme.detail:
|
||||||
|
return Text(
|
||||||
|
data!,
|
||||||
|
style: const TextStyle(
|
||||||
|
color: CupertinoColors.inactiveGray,
|
||||||
|
fontSize: 15.0,
|
||||||
|
letterSpacing: -0.41,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
case CupertinoTextTheme.custom:
|
||||||
|
return Text(
|
||||||
|
data!,
|
||||||
|
style: style ??
|
||||||
|
const TextStyle(
|
||||||
|
color: CupertinoColors.inactiveGray,
|
||||||
|
fontSize: 15.0,
|
||||||
|
letterSpacing: -0.41,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return Container();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
name: cupertino_controllers
|
||||||
|
description: A Flutter plugin with Cupertino Controller Examples. This includes a Table View Controller, Master Detail Controller, Cupertino Cell with Xcode Storyboard templates (basic detail, subtitle...), and detail examples
|
||||||
|
version: 1.1.0
|
||||||
|
author: Rhodes Davis Jr. <rody.davis.jr@gmail.com>
|
||||||
|
homepage: https://github.com/rodydavis/plugins
|
||||||
|
repository: https://github.com/rodydavis/cupertino_controllers
|
||||||
|
|
||||||
|
environment:
|
||||||
|
sdk: '>=2.12.0-259.8.beta < 3.0.0'
|
||||||
|
|
||||||
|
dependencies:
|
||||||
|
flutter:
|
||||||
|
sdk: flutter
|
||||||
|
flutter_slidable: ^0.6.0-nullsafety.0
|
||||||
|
flutter_sticky_header: ^0.5.0
|
||||||
|
|
||||||
|
flutter:
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
# Auto detect text files and perform LF normalization
|
||||||
|
* text=auto
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
name: github pages
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: ubuntu-18.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Setup Flutter
|
||||||
|
uses: subosito/flutter-action@v1
|
||||||
|
with:
|
||||||
|
channel: 'dev'
|
||||||
|
|
||||||
|
- name: Install
|
||||||
|
run: |
|
||||||
|
flutter config --enable-web
|
||||||
|
flutter pub get
|
||||||
|
- name: Build
|
||||||
|
run: cd example && flutter build web
|
||||||
|
|
||||||
|
- name: Deploy
|
||||||
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
|
with:
|
||||||
|
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
|
||||||
|
publish_dir: ./example/build/web
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
# See https://www.dartlang.org/guides/libraries/private-files
|
||||||
|
|
||||||
|
# Files and directories created by pub
|
||||||
|
.dart_tool/
|
||||||
|
.packages
|
||||||
|
.pub/
|
||||||
|
build/
|
||||||
|
# If you're building an application, you may want to check-in your pubspec.lock
|
||||||
|
pubspec.lock
|
||||||
|
.DS_Store
|
||||||
|
|
||||||
|
# Directory created by dartdoc
|
||||||
|
# If you don't generate documentation locally you can remove this line.
|
||||||
|
doc/api/
|
||||||
|
packages/flutter_midi/ios/Classes/sound_font.SF2
|
||||||
|
*.SF2
|
||||||
|
*.SF2
|
||||||
|
packages/flutter_midi/example/ios/sound_font.SF2
|
||||||
|
packages/flutter_midi/example/ios/sound_font.SF2
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
language: dart
|
||||||
|
dart:
|
||||||
|
- stable
|
||||||
|
- dev
|
||||||
|
- "1.17.1"
|
||||||
|
- "1.24.3"
|
||||||
|
- "2.0.0"
|
||||||
|
sudo: false
|
||||||
|
script:
|
||||||
|
- set -e
|
||||||
|
- dartanalyzer --fatal-warnings .
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
// Use IntelliSense to learn about possible attributes.
|
||||||
|
// Hover to view descriptions of existing attributes.
|
||||||
|
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "flutter",
|
||||||
|
"program": "example/lib/main.dart",
|
||||||
|
"request": "launch",
|
||||||
|
"type": "dart"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
## 1.1.0
|
||||||
|
|
||||||
|
* Stable release
|
||||||
|
|
||||||
|
## 1.0.0-nullsafety
|
||||||
|
|
||||||
|
* Null Safety
|
||||||
|
|
||||||
|
## 05.14.2019
|
||||||
|
|
||||||
|
* Base Wrapper Added
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2020 Rody Davis
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
[](https://www.buymeacoffee.com/rodydavis)
|
||||||
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=WSH3GVC49GNNJ)
|
||||||
|

|
||||||
|
[](https://github.com/rodydavis/dart_firebase)
|
||||||
|
[](https://pub.dev/packages/dart_firebase)
|
||||||
|
|
||||||
|
|
||||||
|
# dart_firebase
|
||||||
|
|
||||||
|
Wrapper for the Firebase REST API in Pure Dart for Web and Desktop or Mobile.
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
linter:
|
||||||
|
rules:
|
||||||
|
- always_declare_return_types
|
||||||
|
- camel_case_types
|
||||||
|
- empty_constructor_bodies
|
||||||
|
- annotate_overrides
|
||||||
|
- avoid_init_to_null
|
||||||
|
- constant_identifier_names
|
||||||
|
- one_member_abstracts
|
||||||
|
- slash_for_doc_comments
|
||||||
|
- sort_constructors_first
|
||||||
|
- avoid_empty_else
|
||||||
|
- cancel_subscriptions
|
||||||
|
- close_sinks
|
||||||