Skip to content

Commit 6f81077

Browse files
authored
Use new project template (flutter#10376)
1 parent 6bff133 commit 6f81077

File tree

16 files changed

+129
-122
lines changed

16 files changed

+129
-122
lines changed
Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
1+
// Copyright 2017 The Chromium Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
15
package io.flutter.examples.Layers;
26

37
import android.os.Bundle;
48
import io.flutter.app.FlutterActivity;
9+
import io.flutter.plugins.GeneratedPluginRegistrant;
510

611
public class MainActivity extends FlutterActivity {
7-
@Override
8-
protected void onCreate(Bundle savedInstanceState) {
9-
super.onCreate(savedInstanceState);
10-
}
12+
@Override
13+
protected void onCreate(Bundle savedInstanceState) {
14+
super.onCreate(savedInstanceState);
15+
GeneratedPluginRegistrant.registerWith(this);
16+
}
1117
}
1218

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package io.flutter.plugins;
2+
3+
import io.flutter.plugin.common.PluginRegistry;
4+
5+
/**
6+
* Generated file. Do not edit.
7+
*/
8+
public final class GeneratedPluginRegistrant {
9+
public static void registerWith(PluginRegistry registry) {
10+
}
11+
}

examples/layers/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
1111
3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
1212
3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
13+
74970F711EDC1D40000507F3 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 74970F701EDC1D40000507F3 /* GeneratedPluginRegistrant.m */; };
1314
9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
1415
9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
1516
9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; };
@@ -40,6 +41,8 @@
4041
/* Begin PBXFileReference section */
4142
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
4243
3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = "<group>"; };
44+
74970F6F1EDC1D40000507F3 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
45+
74970F701EDC1D40000507F3 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
4346
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
4447
7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
4548
7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
@@ -102,6 +105,8 @@
102105
97C146F01CF9000F007C117D /* Runner */ = {
103106
isa = PBXGroup;
104107
children = (
108+
74970F6F1EDC1D40000507F3 /* GeneratedPluginRegistrant.h */,
109+
74970F701EDC1D40000507F3 /* GeneratedPluginRegistrant.m */,
105110
7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */,
106111
7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */,
107112
97C146FA1CF9000F007C117D /* Main.storyboard */,
@@ -231,6 +236,7 @@
231236
files = (
232237
978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */,
233238
97C146F31CF9000F007C117D /* main.m in Sources */,
239+
74970F711EDC1D40000507F3 /* GeneratedPluginRegistrant.m in Sources */,
234240
);
235241
runOnlyForDeploymentPostprocessing = 0;
236242
};
Lines changed: 8 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,15 @@
1+
// Copyright 2017 The Chromium Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
15
#include "AppDelegate.h"
6+
#include "GeneratedPluginRegistrant.h"
27

38
@implementation AppDelegate
49

510
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
6-
// Override point for customization after application launch.
7-
return YES;
8-
}
9-
10-
- (void)applicationWillResignActive:(UIApplication *)application {
11-
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
12-
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
13-
}
14-
15-
- (void)applicationDidEnterBackground:(UIApplication *)application {
16-
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
17-
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
18-
}
19-
20-
- (void)applicationWillEnterForeground:(UIApplication *)application {
21-
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
22-
}
23-
24-
- (void)applicationDidBecomeActive:(UIApplication *)application {
25-
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
11+
[GeneratedPluginRegistrant registerWithRegistry:self];
12+
// Override point for customization after application launch.
13+
return [super application:application didFinishLaunchingWithOptions:launchOptions];
2614
}
27-
28-
- (void)applicationWillTerminate:(UIApplication *)application {
29-
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
30-
}
31-
3215
@end
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
//
2+
// Generated file. Do not edit.
3+
//
4+
5+
#ifndef GeneratedPluginRegistrant_h
6+
#define GeneratedPluginRegistrant_h
7+
8+
#import <Flutter/Flutter.h>
9+
10+
@interface GeneratedPluginRegistrant : NSObject
11+
+ (void)registerWithRegistry:(NSObject<FlutterPluginRegistry>*)registry;
12+
@end
13+
14+
#endif /* GeneratedPluginRegistrant_h */
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
//
2+
// Generated file. Do not edit.
3+
//
4+
5+
#import "GeneratedPluginRegistrant.h"
6+
7+
@implementation GeneratedPluginRegistrant
8+
9+
+ (void)registerWithRegistry:(NSObject<FlutterPluginRegistry>*)registry {
10+
}
11+
12+
@end

examples/layers/lib/main.dart

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// Copyright 2017 The Chromium Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
5+
import 'package:flutter/widgets.dart';
6+
7+
void main() => runApp(const Center(child: const Text('flutter run -t xxx/yyy.dart')));
Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
1+
// Copyright 2017 The Chromium Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
15
package io.flutter.examples.stocks;
26

37
import android.os.Bundle;
48
import io.flutter.app.FlutterActivity;
5-
import io.flutter.plugins.PluginRegistry;
9+
import io.flutter.plugins.GeneratedPluginRegistrant;
610

711
public class MainActivity extends FlutterActivity {
8-
PluginRegistry pluginRegistry;
9-
10-
@Override
11-
protected void onCreate(Bundle savedInstanceState) {
12-
super.onCreate(savedInstanceState);
13-
pluginRegistry = new PluginRegistry();
14-
pluginRegistry.registerAll(this);
15-
}
12+
@Override
13+
protected void onCreate(Bundle savedInstanceState) {
14+
super.onCreate(savedInstanceState);
15+
GeneratedPluginRegistrant.registerWith(this);
16+
}
1617
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package io.flutter.plugins;
2+
3+
import io.flutter.plugin.common.PluginRegistry;
4+
5+
/**
6+
* Generated file. Do not edit.
7+
*/
8+
public final class GeneratedPluginRegistrant {
9+
public static void registerWith(PluginRegistry registry) {
10+
}
11+
}

examples/stocks/android/app/src/main/java/io/flutter/plugins/PluginRegistry.java

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)