Move scoped_model_counter to provider_counter (#82)

I used `flutter create` anew, so the project structure now has additional 2 `AndroidManifest.xml` files. Everything else stayed the same, so from git’s perspective, it’s just moved files.
pull/83/head
Filip Hracek 5 years ago committed by GitHub
parent a335558d44
commit 31edec5378
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -49,10 +49,12 @@ start.
A simple app showing three different approaches to deserializing JSON:
hand-written constructors, `json_serializable`, and `built_value`.
#### [scoped_model_counter](scoped_model_counter) _(Flutter team)_
#### [provider_counter](provider_counter) _(Flutter team)_
The simplest possible app (the counter) using `provider`
for state management. (This was previously known as `scoped_model_counter`,
and used `scoped_model` for state management.)
The simplest possible app (the counter) using `scoped_model`
for state management.
## UI

@ -4,7 +4,7 @@
# This file should be version controlled and should not be manually edited.
version:
revision: 5391447fae6209bb21a89e6a5a6583cac1af9b4b
channel: stable
revision: 7a4c33425ddd78c54aba07d86f3f9a4a0051769b
channel: beta
project_type: app

@ -1,12 +1,12 @@
# ScopedModel Counter
# Provider Counter
The starter Flutter application, but using ScopedModel to manage state.
The starter Flutter application, but using Provider to manage state.
This app is a direct counterpart to the
[simple counter application](https://flutter.io/docs/development/ui/widgets-intro#changing-widgets-in-response-to-input)
that you get when you create a new Flutter project. That one uses a `StatefulWidget` to manage
application state. The version in this repository uses a simple app state management approach,
`ScopedModel`.
`Provider`.
It shows how you might deal with state that is modified from outside the app (for example,
state synchronized over network) and which needs to be accessed and changed
@ -17,9 +17,9 @@ from different parts of your app.
The only important part of the app is the `lib/main.dart` file. It has comments that will walk you
through it.
For more information on the `scoped_model` package (where `ScopedModel` comes from), please
[see the package documentation](https://pub.dartlang.org/packages/scoped_model).
For more information on the `provider` package (where `Provider` comes from), please
[see the package documentation](https://pub.dartlang.org/packages/provider).
For more information on state management in Flutter, and a list of other approaches,
head over to the
[State management page at flutter.io](https://flutter.io/docs/development/data-and-backend/state-mgmt).
[State management page at flutter.dev](https://flutter.dev/docs/development/data-and-backend/state-mgmt).

@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
compileSdkVersion 27
compileSdkVersion 28
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
@ -38,9 +38,9 @@ android {
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "io.flutter.scopedmodelcounter"
applicationId "dev.flutter.provider_counter"
minSdkVersion 16
targetSdkVersion 27
targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

@ -0,0 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="dev.flutter.provider_counter">
<!-- 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>

@ -1,11 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="io.flutter.scopedmodelcounter">
<!-- The INTERNET permission is required for development. Specifically,
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"/>
package="dev.flutter.provider_counter">
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate method.
@ -14,13 +8,13 @@
FlutterApplication and put your custom class here. -->
<application
android:name="io.flutter.app.FlutterApplication"
android:label="scoped_model_counter"
android:label="provider_counter"
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<!-- This keeps the window background of the activity showing

@ -0,0 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="dev.flutter.provider_counter">
<!-- 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>

@ -8,7 +8,6 @@
/* Begin PBXBuildFile section */
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */ = {isa = PBXBuildFile; fileRef = 2D5378251FAA1A9400D5DBA9 /* flutter_assets */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
@ -39,7 +38,6 @@
/* 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>"; };
2D5378251FAA1A9400D5DBA9 /* flutter_assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = flutter_assets; path = Flutter/flutter_assets; sourceTree = SOURCE_ROOT; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = "<group>"; };
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
@ -71,7 +69,6 @@
9740EEB11CF90186004384FC /* Flutter */ = {
isa = PBXGroup;
children = (
2D5378251FAA1A9400D5DBA9 /* flutter_assets */,
3B80C3931E831B6300D905FE /* App.framework */,
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
9740EEBA1CF902C7004384FC /* Flutter.framework */,
@ -187,7 +184,6 @@
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */,
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */,
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
@ -323,7 +319,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = io.flutter.scopedModelCounter;
PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.providerCounter;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
VERSIONING_SYSTEM = "apple-generic";
@ -451,7 +447,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = io.flutter.scopedModelCounter;
PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.providerCounter;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
@ -479,7 +475,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = io.flutter.scopedModelCounter;
PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.providerCounter;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_SWIFT3_OBJC_INFERENCE = On;

@ -11,7 +11,7 @@
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>scoped_model_counter</string>
<string>provider_counter</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>

@ -7,7 +7,7 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.8"
version: "2.1.0"
boolean_selector:
dependency: transitive
description:
@ -52,7 +52,7 @@ packages:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.3+1"
version: "0.12.5"
meta:
dependency: transitive
description:
@ -73,21 +73,21 @@ packages:
name: pedantic
url: "https://pub.dartlang.org"
source: hosted
version: "1.4.0"
quiver:
dependency: transitive
version: "1.5.0"
provider:
dependency: "direct main"
description:
name: quiver
name: provider
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.1"
scoped_model:
dependency: "direct main"
quiver:
dependency: transitive
description:
name: scoped_model
name: quiver
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.1"
version: "2.0.2"
sky_engine:
dependency: transitive
description: flutter
@ -99,7 +99,7 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.5.4"
version: "1.5.5"
stack_trace:
dependency: transitive
description:
@ -113,7 +113,7 @@ packages:
name: stream_channel
url: "https://pub.dartlang.org"
source: hosted
version: "1.6.8"
version: "2.0.0"
string_scanner:
dependency: transitive
description:
@ -134,7 +134,7 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.2"
version: "0.2.4"
typed_data:
dependency: transitive
description:
@ -150,4 +150,4 @@ packages:
source: hosted
version: "2.0.8"
sdks:
dart: ">=2.1.0 <3.0.0"
dart: ">=2.2.0 <3.0.0"

@ -1,8 +1,8 @@
name: scoped_model_counter
name: provider_counter
description: >
The starter Flutter application, but using ScopedModel to manage state.
The starter Flutter application, but using Provider to manage state.
version: 1.0.0+1
version: 1.0.0
environment:
sdk: ">=2.0.0-dev.68.0 <3.0.0"

@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:provider/provider.dart';
import 'package:scoped_model_counter/main.dart';
import 'package:provider_counter/main.dart';
void main() {
testWidgets('Counter increments smoke test', (WidgetTester tester) async {

@ -3,7 +3,7 @@ set -e
declare -a PROJECT_NAMES=(
"jsonexample" \
"shrine" \
"scoped_model_counter" \
"provider_counter" \
"veggieseasons" \
"place_tracker" \
"platform_view_swift" \

Loading…
Cancel
Save