├── .gitignore
├── .idea
├── .gitignore
├── codeStyles
│ └── Project.xml
├── inspectionProfiles
│ └── Project_Default.xml
├── libraries
│ ├── Flutter_Plugins.xml
│ └── Flutter_for_Android.xml
├── modules.xml
├── runConfigurations
│ └── debug.xml
└── vcs.xml
├── .metadata
├── CHANGELOG.md
├── LICENSE
├── README.md
├── android
├── .gitignore
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
├── settings.gradle
└── src
│ └── main
│ ├── AndroidManifest.xml
│ └── java
│ └── com
│ └── lib
│ └── fps
│ └── fps
│ └── FpsPlugin.java
├── example
├── .gitignore
├── .metadata
├── README.md
├── android
│ ├── .gitignore
│ ├── app
│ │ ├── build.gradle
│ │ └── src
│ │ │ ├── debug
│ │ │ └── AndroidManifest.xml
│ │ │ ├── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ │ └── lib
│ │ │ │ │ └── fps
│ │ │ │ │ └── fps_example
│ │ │ │ │ └── MainActivity.java
│ │ │ └── res
│ │ │ │ ├── drawable
│ │ │ │ └── launch_background.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ └── values
│ │ │ │ └── styles.xml
│ │ │ └── profile
│ │ │ └── AndroidManifest.xml
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ └── gradle-wrapper.properties
│ └── settings.gradle
├── ios
│ ├── .gitignore
│ ├── Flutter
│ │ ├── AppFrameworkInfo.plist
│ │ ├── Debug.xcconfig
│ │ └── Release.xcconfig
│ ├── Podfile
│ ├── Podfile.lock
│ ├── Runner.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ └── WorkspaceSettings.xcsettings
│ ├── Runner.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ └── WorkspaceSettings.xcsettings
│ └── Runner
│ │ ├── AppDelegate.h
│ │ ├── AppDelegate.m
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ ├── Contents.json
│ │ │ ├── Icon-App-1024x1024@1x.png
│ │ │ ├── Icon-App-20x20@1x.png
│ │ │ ├── Icon-App-20x20@2x.png
│ │ │ ├── Icon-App-20x20@3x.png
│ │ │ ├── Icon-App-29x29@1x.png
│ │ │ ├── Icon-App-29x29@2x.png
│ │ │ ├── Icon-App-29x29@3x.png
│ │ │ ├── Icon-App-40x40@1x.png
│ │ │ ├── Icon-App-40x40@2x.png
│ │ │ ├── Icon-App-40x40@3x.png
│ │ │ ├── Icon-App-60x60@2x.png
│ │ │ ├── Icon-App-60x60@3x.png
│ │ │ ├── Icon-App-76x76@1x.png
│ │ │ ├── Icon-App-76x76@2x.png
│ │ │ └── Icon-App-83.5x83.5@2x.png
│ │ └── LaunchImage.imageset
│ │ │ ├── Contents.json
│ │ │ ├── LaunchImage.png
│ │ │ ├── LaunchImage@2x.png
│ │ │ ├── LaunchImage@3x.png
│ │ │ └── README.md
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── main.m
├── lib
│ ├── demo.dart
│ ├── fps_helper.dart
│ └── main.dart
├── pubspec.lock
├── pubspec.yaml
└── test
│ └── widget_test.dart
├── fps.iml
├── ios
├── .gitignore
├── Assets
│ └── .gitkeep
├── Classes
│ ├── FpsPlugin.h
│ └── FpsPlugin.m
└── performance_fps.podspec
├── lib
├── binding_fps.dart
├── fps_callback.dart
├── fps_computer.dart
├── performance_fps.dart
├── plugin
│ └── fps_plugin.dart
└── util
│ └── debug_log.dart
├── pubspec.lock
└── pubspec.yaml
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | .dart_tool/
3 |
4 | .packages
5 | .pub/
6 |
7 |
8 | # IntelliJ related
9 | *.iml
10 | *.ipr
11 | *.iws
12 | .idea/
13 | /.idea/
14 |
15 | # Visual Studio Code related
16 | .vscode/settings.json
17 | .settings/
18 | .project
19 |
20 | build/
21 | *.xcscheme
--------------------------------------------------------------------------------
/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Project exclude paths
2 | /.
3 |
4 |
--------------------------------------------------------------------------------
/.idea/codeStyles/Project.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | xmlns:android
14 |
15 | ^$
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | xmlns:.*
25 |
26 | ^$
27 |
28 |
29 | BY_NAME
30 |
31 |
32 |
33 |
34 |
35 |
36 | .*:id
37 |
38 | http://schemas.android.com/apk/res/android
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 | .*:name
48 |
49 | http://schemas.android.com/apk/res/android
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 | name
59 |
60 | ^$
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 | style
70 |
71 | ^$
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 | .*
81 |
82 | ^$
83 |
84 |
85 | BY_NAME
86 |
87 |
88 |
89 |
90 |
91 |
92 | .*
93 |
94 | http://schemas.android.com/apk/res/android
95 |
96 |
97 | ANDROID_ATTRIBUTE_ORDER
98 |
99 |
100 |
101 |
102 |
103 |
104 | .*
105 |
106 | .*
107 |
108 |
109 | BY_NAME
110 |
111 |
112 |
113 |
114 |
115 |
116 |
--------------------------------------------------------------------------------
/.idea/inspectionProfiles/Project_Default.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/.idea/libraries/Flutter_Plugins.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/libraries/Flutter_for_Android.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.idea/runConfigurations/debug.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: 0aadddae17e3de48ba66a7ce825535f77b4d1a38
8 | channel: unknown
9 |
10 | project_type: plugin
11 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ## 0.0.1
2 |
3 | * support Android and iOS calculate fps online
4 |
5 | ## 0.0.2
6 |
7 | * promote point ,update readme
8 |
9 | ## 0.0.3
10 |
11 | * fix compile error
12 |
13 | ## 0.0.4
14 |
15 | * del log
16 |
17 |
18 | ## 0.0.5
19 |
20 | * del unused import
21 |
22 | ## 0.0.6
23 |
24 | * update demo
25 |
26 | ## 0.0.7
27 |
28 | * migrate null-safety
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 allen
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # performance_fps
2 |
3 | Flutter plugin for calculate fps online on Android and IOS,
4 | its result is the same as flutter performance
5 |
6 | ## Getting Started
7 |
8 | This project is a starting point for a Flutter
9 | [plug-in package](https://flutter.dev/developing-packages/),
10 | a specialized package that includes platform-specific implementation code for
11 | Android and/or iOS.
12 |
13 | For help getting started with Flutter, view our
14 | [online documentation](https://flutter.dev/docs), which offers tutorials,
15 | samples, guidance on mobile development, and a full API reference.
16 |
17 | ## Installation
18 | ```yaml
19 | dependencies:
20 | performance_fps: ^0.0.7
21 | ```
22 |
23 | ### Import
24 |
25 | ```dart
26 | import 'package:performance_fps/performance_fps.dart';
27 | ```
28 |
29 | ## Usage
30 | https://pub.dev/packages/performance_fps
31 | ```dart
32 | Fps.instance.registerCallBack((fps, dropCount) {
33 | // current fps
34 | });
35 |
36 | Fps.instance.cancel();
37 | ```
38 |
39 | ## License
40 |
41 | MIT License
42 |
--------------------------------------------------------------------------------
/android/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/workspace.xml
5 | /.idea/libraries
6 | .DS_Store
7 | /build
8 | /captures
9 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | group 'com.lib.fps.fps'
2 | version '1.0'
3 |
4 | buildscript {
5 | repositories {
6 | google()
7 | jcenter()
8 | }
9 |
10 | dependencies {
11 | classpath 'com.android.tools.build:gradle:3.5.0'
12 | }
13 | }
14 |
15 | rootProject.allprojects {
16 | repositories {
17 | google()
18 | jcenter()
19 | }
20 | }
21 |
22 | apply plugin: 'com.android.library'
23 |
24 | android {
25 | compileSdkVersion 28
26 |
27 | defaultConfig {
28 | minSdkVersion 16
29 | }
30 | lintOptions {
31 | disable 'InvalidPackage'
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.enableR8=true
3 | android.useAndroidX=true
4 | android.enableJetifier=true
5 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | zipStoreBase=GRADLE_USER_HOME
4 | zipStorePath=wrapper/dists
5 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
6 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'fps'
2 |
--------------------------------------------------------------------------------
/android/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
--------------------------------------------------------------------------------
/android/src/main/java/com/lib/fps/fps/FpsPlugin.java:
--------------------------------------------------------------------------------
1 | package com.lib.fps.fps;
2 |
3 | import android.content.Context;
4 | import android.view.WindowManager;
5 | import androidx.annotation.NonNull;
6 |
7 | import io.flutter.embedding.engine.plugins.FlutterPlugin;
8 | import io.flutter.plugin.common.MethodCall;
9 | import io.flutter.plugin.common.MethodChannel;
10 | import io.flutter.plugin.common.MethodChannel.MethodCallHandler;
11 | import io.flutter.plugin.common.MethodChannel.Result;
12 | import io.flutter.plugin.common.PluginRegistry.Registrar;
13 |
14 | /** FpsPlugin */
15 | public class FpsPlugin implements FlutterPlugin, MethodCallHandler {
16 | /// The MethodChannel that will the communication between Flutter and native Android
17 | ///
18 | /// This local reference serves to register the plugin with the Flutter Engine and unregister it
19 | /// when the Flutter Engine is detached from the Activity
20 | private MethodChannel channel;
21 | private Context context;
22 |
23 |
24 | @Override
25 | public void onAttachedToEngine(@NonNull FlutterPluginBinding flutterPluginBinding) {
26 | context = flutterPluginBinding.getApplicationContext();
27 | channel = new MethodChannel(flutterPluginBinding.getFlutterEngine().getDartExecutor(), "fps");
28 | channel.setMethodCallHandler(this);
29 | }
30 |
31 | // This static function is optional and equivalent to onAttachedToEngine. It supports the old
32 | // pre-Flutter-1.12 Android projects. You are encouraged to continue supporting
33 | // plugin registration via this function while apps migrate to use the new Android APIs
34 | // post-flutter-1.12 via https://flutter.dev/go/android-project-migration.
35 | //
36 | // It is encouraged to share logic between onAttachedToEngine and registerWith to keep
37 | // them functionally equivalent. Only one of onAttachedToEngine or registerWith will be called
38 | // depending on the user's project. onAttachedToEngine or registerWith must both be defined
39 | // in the same class.
40 | public static void registerWith(Registrar registrar) {
41 | final MethodChannel channel = new MethodChannel(registrar.messenger(), "fps");
42 | channel.setMethodCallHandler(new FpsPlugin());
43 | }
44 |
45 | @Override
46 | public void onMethodCall(@NonNull MethodCall call, @NonNull Result result) {
47 | if (call.method.equals("getRefreshRate")) {
48 | try {
49 | WindowManager windowManager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
50 | float refreshRate = windowManager.getDefaultDisplay().getRefreshRate();
51 | result.success(refreshRate);
52 | } catch (Exception e) {
53 | result.success(null);
54 | }
55 | } else {
56 | result.notImplemented();
57 | }
58 | }
59 |
60 | @Override
61 | public void onDetachedFromEngine(@NonNull FlutterPluginBinding binding) {
62 | channel.setMethodCallHandler(null);
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/example/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 |
12 | # IntelliJ related
13 | *.iml
14 | *.ipr
15 | *.iws
16 | .idea/
17 |
18 | # The .vscode folder contains launch configuration and tasks you configure in
19 | # VS Code which you may wish to be included in version control, so this line
20 | # is commented out by default.
21 | #.vscode/
22 |
23 | # Flutter/Dart/Pub related
24 | **/doc/api/
25 | .dart_tool/
26 | .flutter-plugins
27 | .flutter-plugins-dependencies
28 | .packages
29 | .pub-cache/
30 | .pub/
31 | /build/
32 |
33 | # Web related
34 | lib/generated_plugin_registrant.dart
35 |
36 | # Symbolication related
37 | app.*.symbols
38 |
39 | # Obfuscation related
40 | app.*.map.json
41 |
42 | # Exceptions to above rules.
43 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
44 |
--------------------------------------------------------------------------------
/example/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: 0aadddae17e3de48ba66a7ce825535f77b4d1a38
8 | channel: unknown
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/example/README.md:
--------------------------------------------------------------------------------
1 | # fps_example
2 |
3 | Demonstrates how to use the fps plugin.
4 |
5 | ## Getting Started
6 |
7 | This project is a starting point for a Flutter application.
8 |
9 | A few resources to get you started if this is your first Flutter project:
10 |
11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
13 |
14 | For help getting started with Flutter, view our
15 | [online documentation](https://flutter.dev/docs), which offers tutorials,
16 | samples, guidance on mobile development, and a full API reference.
17 |
--------------------------------------------------------------------------------
/example/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 |
--------------------------------------------------------------------------------
/example/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | def localProperties = new Properties()
2 | def localPropertiesFile = rootProject.file('local.properties')
3 | if (localPropertiesFile.exists()) {
4 | localPropertiesFile.withReader('UTF-8') { reader ->
5 | localProperties.load(reader)
6 | }
7 | }
8 |
9 | def flutterRoot = localProperties.getProperty('flutter.sdk')
10 | if (flutterRoot == null) {
11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12 | }
13 |
14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15 | if (flutterVersionCode == null) {
16 | flutterVersionCode = '1'
17 | }
18 |
19 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
20 | if (flutterVersionName == null) {
21 | flutterVersionName = '1.0'
22 | }
23 |
24 | apply plugin: 'com.android.application'
25 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
26 |
27 | android {
28 | compileSdkVersion 28
29 |
30 | lintOptions {
31 | disable 'InvalidPackage'
32 | }
33 |
34 | defaultConfig {
35 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
36 | applicationId "com.lib.fps.fps_example"
37 | minSdkVersion 16
38 | targetSdkVersion 28
39 | versionCode flutterVersionCode.toInteger()
40 | versionName flutterVersionName
41 | }
42 |
43 | buildTypes {
44 | release {
45 | // TODO: Add your own signing config for the release build.
46 | // Signing with the debug keys for now, so `flutter run --release` works.
47 | signingConfig signingConfigs.debug
48 | }
49 | }
50 | }
51 |
52 | flutter {
53 | source '../..'
54 | }
55 |
--------------------------------------------------------------------------------
/example/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
8 |
11 |
18 |
22 |
26 |
31 |
35 |
36 |
37 |
38 |
39 |
40 |
42 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/example/android/app/src/main/java/com/lib/fps/fps_example/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.lib.fps.fps_example;
2 |
3 | import io.flutter.embedding.android.FlutterActivity;
4 |
5 | public class MainActivity extends FlutterActivity {
6 | }
7 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/allenymt/flutter_fps/33bf542c14301ab65ac376cbd2695ca77a69f8ea/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/allenymt/flutter_fps/33bf542c14301ab65ac376cbd2695ca77a69f8ea/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/allenymt/flutter_fps/33bf542c14301ab65ac376cbd2695ca77a69f8ea/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/allenymt/flutter_fps/33bf542c14301ab65ac376cbd2695ca77a69f8ea/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/allenymt/flutter_fps/33bf542c14301ab65ac376cbd2695ca77a69f8ea/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/example/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | repositories {
3 | google()
4 | jcenter()
5 | }
6 |
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:3.5.0'
9 | }
10 | }
11 |
12 | allprojects {
13 | repositories {
14 | google()
15 | jcenter()
16 | }
17 | }
18 |
19 | rootProject.buildDir = '../build'
20 | subprojects {
21 | project.buildDir = "${rootProject.buildDir}/${project.name}"
22 | }
23 | subprojects {
24 | project.evaluationDependsOn(':app')
25 | }
26 |
27 | task clean(type: Delete) {
28 | delete rootProject.buildDir
29 | }
30 |
--------------------------------------------------------------------------------
/example/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.enableR8=true
3 | android.useAndroidX=true
4 | android.enableJetifier=true
5 |
--------------------------------------------------------------------------------
/example/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Jun 23 08:50:38 CEST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
7 |
--------------------------------------------------------------------------------
/example/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
4 |
5 | def plugins = new Properties()
6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
7 | if (pluginsFile.exists()) {
8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
9 | }
10 |
11 | plugins.each { name, path ->
12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
13 | include ":$name"
14 | project(":$name").projectDir = pluginDirectory
15 | }
16 |
--------------------------------------------------------------------------------
/example/ios/.gitignore:
--------------------------------------------------------------------------------
1 | *.mode1v3
2 | *.mode2v3
3 | *.moved-aside
4 | *.pbxuser
5 | *.perspectivev3
6 | **/*sync/
7 | .sconsign.dblite
8 | .tags*
9 | **/.vagrant/
10 | **/DerivedData/
11 | Icon?
12 | **/Pods/
13 | **/.symlinks/
14 | profile
15 | xcuserdata
16 | **/.generated/
17 | Flutter/App.framework
18 | Flutter/Flutter.framework
19 | Flutter/Flutter.podspec
20 | Flutter/Generated.xcconfig
21 | Flutter/app.flx
22 | Flutter/app.zip
23 | Flutter/flutter_assets/
24 | Flutter/flutter_export_environment.sh
25 | ServiceDefinitions.json
26 | Runner/GeneratedPluginRegistrant.*
27 |
28 | # Exceptions to above rules.
29 | !default.mode1v3
30 | !default.mode2v3
31 | !default.pbxuser
32 | !default.perspectivev3
33 |
--------------------------------------------------------------------------------
/example/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 8.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/example/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/example/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/example/ios/Podfile:
--------------------------------------------------------------------------------
1 | # Uncomment this line to define a global platform for your project
2 | # platform :ios, '9.0'
3 |
4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true'
6 |
7 | project 'Runner', {
8 | 'Debug' => :debug,
9 | 'Profile' => :release,
10 | 'Release' => :release,
11 | }
12 |
13 | def parse_KV_file(file, separator='=')
14 | file_abs_path = File.expand_path(file)
15 | if !File.exists? file_abs_path
16 | return [];
17 | end
18 | generated_key_values = {}
19 | skip_line_start_symbols = ["#", "/"]
20 | File.foreach(file_abs_path) do |line|
21 | next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
22 | plugin = line.split(pattern=separator)
23 | if plugin.length == 2
24 | podname = plugin[0].strip()
25 | path = plugin[1].strip()
26 | podpath = File.expand_path("#{path}", file_abs_path)
27 | generated_key_values[podname] = podpath
28 | else
29 | puts "Invalid plugin specification: #{line}"
30 | end
31 | end
32 | generated_key_values
33 | end
34 |
35 | target 'Runner' do
36 | # Flutter Pod
37 |
38 | copied_flutter_dir = File.join(__dir__, 'Flutter')
39 | copied_framework_path = File.join(copied_flutter_dir, 'Flutter.framework')
40 | copied_podspec_path = File.join(copied_flutter_dir, 'Flutter.podspec')
41 | unless File.exist?(copied_framework_path) && File.exist?(copied_podspec_path)
42 | # Copy Flutter.framework and Flutter.podspec to Flutter/ to have something to link against if the xcode backend script has not run yet.
43 | # That script will copy the correct debug/profile/release version of the framework based on the currently selected Xcode configuration.
44 | # CocoaPods will not embed the framework on pod install (before any build phases can generate) if the dylib does not exist.
45 |
46 | generated_xcode_build_settings_path = File.join(copied_flutter_dir, 'Generated.xcconfig')
47 | unless File.exist?(generated_xcode_build_settings_path)
48 | raise "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first"
49 | end
50 | generated_xcode_build_settings = parse_KV_file(generated_xcode_build_settings_path)
51 | cached_framework_dir = generated_xcode_build_settings['FLUTTER_FRAMEWORK_DIR'];
52 |
53 | unless File.exist?(copied_framework_path)
54 | FileUtils.cp_r(File.join(cached_framework_dir, 'Flutter.framework'), copied_flutter_dir)
55 | end
56 | unless File.exist?(copied_podspec_path)
57 | FileUtils.cp(File.join(cached_framework_dir, 'Flutter.podspec'), copied_flutter_dir)
58 | end
59 | end
60 |
61 | # Keep pod path relative so it can be checked into Podfile.lock.
62 | pod 'Flutter', :path => 'Flutter'
63 |
64 | # Plugin Pods
65 |
66 | # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
67 | # referring to absolute paths on developers' machines.
68 | system('rm -rf .symlinks')
69 | system('mkdir -p .symlinks/plugins')
70 | plugin_pods = parse_KV_file('../.flutter-plugins')
71 | plugin_pods.each do |name, path|
72 | symlink = File.join('.symlinks', 'plugins', name)
73 | File.symlink(path, symlink)
74 | pod name, :path => File.join(symlink, 'ios')
75 | end
76 | end
77 |
78 | post_install do |installer|
79 | installer.pods_project.targets.each do |target|
80 | target.build_configurations.each do |config|
81 | config.build_settings['ENABLE_BITCODE'] = 'NO'
82 | end
83 | end
84 | end
85 |
--------------------------------------------------------------------------------
/example/ios/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - Flutter (1.0.0)
3 | - fps (0.0.1):
4 | - Flutter
5 |
6 | DEPENDENCIES:
7 | - Flutter (from `Flutter`)
8 | - fps (from `.symlinks/plugins/fps/ios`)
9 |
10 | EXTERNAL SOURCES:
11 | Flutter:
12 | :path: Flutter
13 | fps:
14 | :path: ".symlinks/plugins/fps/ios"
15 |
16 | SPEC CHECKSUMS:
17 | Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
18 | fps: 5b5c808a0e6165df1337763abaf83d815fe52e3e
19 |
20 | PODFILE CHECKSUM: f32fb4e7c14f8b3ca19a369d7be425dd9241af27
21 |
22 | COCOAPODS: 1.9.1
23 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
12 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
13 | 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
14 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
15 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
16 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
17 | D2B1FE40609433CEC0536C26 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 79E92C28981803D0FAFE6987 /* libPods-Runner.a */; };
18 | /* End PBXBuildFile section */
19 |
20 | /* Begin PBXCopyFilesBuildPhase section */
21 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
22 | isa = PBXCopyFilesBuildPhase;
23 | buildActionMask = 2147483647;
24 | dstPath = "";
25 | dstSubfolderSpec = 10;
26 | files = (
27 | );
28 | name = "Embed Frameworks";
29 | runOnlyForDeploymentPostprocessing = 0;
30 | };
31 | /* End PBXCopyFilesBuildPhase section */
32 |
33 | /* Begin PBXFileReference section */
34 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
35 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
36 | 31333E2945F7E8619BD3E846 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; };
37 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
38 | 568AD8D2466B5D28D3CFA5E3 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; };
39 | 79E92C28981803D0FAFE6987 /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; };
40 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
41 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
42 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
43 | 7E5906027506852521C97897 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; };
44 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
45 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
46 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
47 | 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
48 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
49 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
50 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
51 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
52 | /* End PBXFileReference section */
53 |
54 | /* Begin PBXFrameworksBuildPhase section */
55 | 97C146EB1CF9000F007C117D /* Frameworks */ = {
56 | isa = PBXFrameworksBuildPhase;
57 | buildActionMask = 2147483647;
58 | files = (
59 | D2B1FE40609433CEC0536C26 /* libPods-Runner.a in Frameworks */,
60 | );
61 | runOnlyForDeploymentPostprocessing = 0;
62 | };
63 | /* End PBXFrameworksBuildPhase section */
64 |
65 | /* Begin PBXGroup section */
66 | 3BC1813E22F61F414FCC72F0 /* Frameworks */ = {
67 | isa = PBXGroup;
68 | children = (
69 | 79E92C28981803D0FAFE6987 /* libPods-Runner.a */,
70 | );
71 | name = Frameworks;
72 | sourceTree = "";
73 | };
74 | 9740EEB11CF90186004384FC /* Flutter */ = {
75 | isa = PBXGroup;
76 | children = (
77 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
78 | 9740EEB21CF90195004384FC /* Debug.xcconfig */,
79 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
80 | 9740EEB31CF90195004384FC /* Generated.xcconfig */,
81 | );
82 | name = Flutter;
83 | sourceTree = "";
84 | };
85 | 97C146E51CF9000F007C117D = {
86 | isa = PBXGroup;
87 | children = (
88 | 9740EEB11CF90186004384FC /* Flutter */,
89 | 97C146F01CF9000F007C117D /* Runner */,
90 | 97C146EF1CF9000F007C117D /* Products */,
91 | B6B3B622C64180A28D8DB102 /* Pods */,
92 | 3BC1813E22F61F414FCC72F0 /* Frameworks */,
93 | );
94 | sourceTree = "";
95 | };
96 | 97C146EF1CF9000F007C117D /* Products */ = {
97 | isa = PBXGroup;
98 | children = (
99 | 97C146EE1CF9000F007C117D /* Runner.app */,
100 | );
101 | name = Products;
102 | sourceTree = "";
103 | };
104 | 97C146F01CF9000F007C117D /* Runner */ = {
105 | isa = PBXGroup;
106 | children = (
107 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */,
108 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */,
109 | 97C146FA1CF9000F007C117D /* Main.storyboard */,
110 | 97C146FD1CF9000F007C117D /* Assets.xcassets */,
111 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
112 | 97C147021CF9000F007C117D /* Info.plist */,
113 | 97C146F11CF9000F007C117D /* Supporting Files */,
114 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
115 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
116 | );
117 | path = Runner;
118 | sourceTree = "";
119 | };
120 | 97C146F11CF9000F007C117D /* Supporting Files */ = {
121 | isa = PBXGroup;
122 | children = (
123 | 97C146F21CF9000F007C117D /* main.m */,
124 | );
125 | name = "Supporting Files";
126 | sourceTree = "";
127 | };
128 | B6B3B622C64180A28D8DB102 /* Pods */ = {
129 | isa = PBXGroup;
130 | children = (
131 | 7E5906027506852521C97897 /* Pods-Runner.debug.xcconfig */,
132 | 568AD8D2466B5D28D3CFA5E3 /* Pods-Runner.release.xcconfig */,
133 | 31333E2945F7E8619BD3E846 /* Pods-Runner.profile.xcconfig */,
134 | );
135 | name = Pods;
136 | path = Pods;
137 | sourceTree = "";
138 | };
139 | /* End PBXGroup section */
140 |
141 | /* Begin PBXNativeTarget section */
142 | 97C146ED1CF9000F007C117D /* Runner */ = {
143 | isa = PBXNativeTarget;
144 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
145 | buildPhases = (
146 | 14C4BF9F88EC62BA5F2C5B76 /* [CP] Check Pods Manifest.lock */,
147 | 9740EEB61CF901F6004384FC /* Run Script */,
148 | 97C146EA1CF9000F007C117D /* Sources */,
149 | 97C146EB1CF9000F007C117D /* Frameworks */,
150 | 97C146EC1CF9000F007C117D /* Resources */,
151 | 9705A1C41CF9048500538489 /* Embed Frameworks */,
152 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
153 | 9135BE9FF64C889318D6B827 /* [CP] Embed Pods Frameworks */,
154 | );
155 | buildRules = (
156 | );
157 | dependencies = (
158 | );
159 | name = Runner;
160 | productName = Runner;
161 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
162 | productType = "com.apple.product-type.application";
163 | };
164 | /* End PBXNativeTarget section */
165 |
166 | /* Begin PBXProject section */
167 | 97C146E61CF9000F007C117D /* Project object */ = {
168 | isa = PBXProject;
169 | attributes = {
170 | LastUpgradeCheck = 1020;
171 | ORGANIZATIONNAME = "";
172 | TargetAttributes = {
173 | 97C146ED1CF9000F007C117D = {
174 | CreatedOnToolsVersion = 7.3.1;
175 | };
176 | };
177 | };
178 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
179 | compatibilityVersion = "Xcode 9.3";
180 | developmentRegion = en;
181 | hasScannedForEncodings = 0;
182 | knownRegions = (
183 | en,
184 | Base,
185 | );
186 | mainGroup = 97C146E51CF9000F007C117D;
187 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
188 | projectDirPath = "";
189 | projectRoot = "";
190 | targets = (
191 | 97C146ED1CF9000F007C117D /* Runner */,
192 | );
193 | };
194 | /* End PBXProject section */
195 |
196 | /* Begin PBXResourcesBuildPhase section */
197 | 97C146EC1CF9000F007C117D /* Resources */ = {
198 | isa = PBXResourcesBuildPhase;
199 | buildActionMask = 2147483647;
200 | files = (
201 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
202 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
203 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
204 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
205 | );
206 | runOnlyForDeploymentPostprocessing = 0;
207 | };
208 | /* End PBXResourcesBuildPhase section */
209 |
210 | /* Begin PBXShellScriptBuildPhase section */
211 | 14C4BF9F88EC62BA5F2C5B76 /* [CP] Check Pods Manifest.lock */ = {
212 | isa = PBXShellScriptBuildPhase;
213 | buildActionMask = 2147483647;
214 | files = (
215 | );
216 | inputFileListPaths = (
217 | );
218 | inputPaths = (
219 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
220 | "${PODS_ROOT}/Manifest.lock",
221 | );
222 | name = "[CP] Check Pods Manifest.lock";
223 | outputFileListPaths = (
224 | );
225 | outputPaths = (
226 | "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
227 | );
228 | runOnlyForDeploymentPostprocessing = 0;
229 | shellPath = /bin/sh;
230 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
231 | showEnvVarsInLog = 0;
232 | };
233 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
234 | isa = PBXShellScriptBuildPhase;
235 | buildActionMask = 2147483647;
236 | files = (
237 | );
238 | inputPaths = (
239 | );
240 | name = "Thin Binary";
241 | outputPaths = (
242 | );
243 | runOnlyForDeploymentPostprocessing = 0;
244 | shellPath = /bin/sh;
245 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
246 | };
247 | 9135BE9FF64C889318D6B827 /* [CP] Embed Pods Frameworks */ = {
248 | isa = PBXShellScriptBuildPhase;
249 | buildActionMask = 2147483647;
250 | files = (
251 | );
252 | inputPaths = (
253 | );
254 | name = "[CP] Embed Pods Frameworks";
255 | outputPaths = (
256 | );
257 | runOnlyForDeploymentPostprocessing = 0;
258 | shellPath = /bin/sh;
259 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
260 | showEnvVarsInLog = 0;
261 | };
262 | 9740EEB61CF901F6004384FC /* Run Script */ = {
263 | isa = PBXShellScriptBuildPhase;
264 | buildActionMask = 2147483647;
265 | files = (
266 | );
267 | inputPaths = (
268 | );
269 | name = "Run Script";
270 | outputPaths = (
271 | );
272 | runOnlyForDeploymentPostprocessing = 0;
273 | shellPath = /bin/sh;
274 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
275 | };
276 | /* End PBXShellScriptBuildPhase section */
277 |
278 | /* Begin PBXSourcesBuildPhase section */
279 | 97C146EA1CF9000F007C117D /* Sources */ = {
280 | isa = PBXSourcesBuildPhase;
281 | buildActionMask = 2147483647;
282 | files = (
283 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */,
284 | 97C146F31CF9000F007C117D /* main.m in Sources */,
285 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
286 | );
287 | runOnlyForDeploymentPostprocessing = 0;
288 | };
289 | /* End PBXSourcesBuildPhase section */
290 |
291 | /* Begin PBXVariantGroup section */
292 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
293 | isa = PBXVariantGroup;
294 | children = (
295 | 97C146FB1CF9000F007C117D /* Base */,
296 | );
297 | name = Main.storyboard;
298 | sourceTree = "";
299 | };
300 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
301 | isa = PBXVariantGroup;
302 | children = (
303 | 97C147001CF9000F007C117D /* Base */,
304 | );
305 | name = LaunchScreen.storyboard;
306 | sourceTree = "";
307 | };
308 | /* End PBXVariantGroup section */
309 |
310 | /* Begin XCBuildConfiguration section */
311 | 249021D3217E4FDB00AE95B9 /* Profile */ = {
312 | isa = XCBuildConfiguration;
313 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
314 | buildSettings = {
315 | ALWAYS_SEARCH_USER_PATHS = NO;
316 | CLANG_ANALYZER_NONNULL = YES;
317 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
318 | CLANG_CXX_LIBRARY = "libc++";
319 | CLANG_ENABLE_MODULES = YES;
320 | CLANG_ENABLE_OBJC_ARC = YES;
321 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
322 | CLANG_WARN_BOOL_CONVERSION = YES;
323 | CLANG_WARN_COMMA = YES;
324 | CLANG_WARN_CONSTANT_CONVERSION = YES;
325 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
326 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
327 | CLANG_WARN_EMPTY_BODY = YES;
328 | CLANG_WARN_ENUM_CONVERSION = YES;
329 | CLANG_WARN_INFINITE_RECURSION = YES;
330 | CLANG_WARN_INT_CONVERSION = YES;
331 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
332 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
333 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
334 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
335 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
336 | CLANG_WARN_STRICT_PROTOTYPES = YES;
337 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
338 | CLANG_WARN_UNREACHABLE_CODE = YES;
339 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
340 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
341 | COPY_PHASE_STRIP = NO;
342 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
343 | ENABLE_NS_ASSERTIONS = NO;
344 | ENABLE_STRICT_OBJC_MSGSEND = YES;
345 | GCC_C_LANGUAGE_STANDARD = gnu99;
346 | GCC_NO_COMMON_BLOCKS = YES;
347 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
348 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
349 | GCC_WARN_UNDECLARED_SELECTOR = YES;
350 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
351 | GCC_WARN_UNUSED_FUNCTION = YES;
352 | GCC_WARN_UNUSED_VARIABLE = YES;
353 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
354 | MTL_ENABLE_DEBUG_INFO = NO;
355 | SDKROOT = iphoneos;
356 | SUPPORTED_PLATFORMS = iphoneos;
357 | TARGETED_DEVICE_FAMILY = "1,2";
358 | VALIDATE_PRODUCT = YES;
359 | };
360 | name = Profile;
361 | };
362 | 249021D4217E4FDB00AE95B9 /* Profile */ = {
363 | isa = XCBuildConfiguration;
364 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
365 | buildSettings = {
366 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
367 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
368 | ENABLE_BITCODE = NO;
369 | FRAMEWORK_SEARCH_PATHS = (
370 | "$(inherited)",
371 | "$(PROJECT_DIR)/Flutter",
372 | );
373 | INFOPLIST_FILE = Runner/Info.plist;
374 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
375 | LIBRARY_SEARCH_PATHS = (
376 | "$(inherited)",
377 | "$(PROJECT_DIR)/Flutter",
378 | );
379 | PRODUCT_BUNDLE_IDENTIFIER = com.lib.fps.fpsExample;
380 | PRODUCT_NAME = "$(TARGET_NAME)";
381 | VERSIONING_SYSTEM = "apple-generic";
382 | };
383 | name = Profile;
384 | };
385 | 97C147031CF9000F007C117D /* Debug */ = {
386 | isa = XCBuildConfiguration;
387 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
388 | buildSettings = {
389 | ALWAYS_SEARCH_USER_PATHS = NO;
390 | CLANG_ANALYZER_NONNULL = YES;
391 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
392 | CLANG_CXX_LIBRARY = "libc++";
393 | CLANG_ENABLE_MODULES = YES;
394 | CLANG_ENABLE_OBJC_ARC = YES;
395 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
396 | CLANG_WARN_BOOL_CONVERSION = YES;
397 | CLANG_WARN_COMMA = YES;
398 | CLANG_WARN_CONSTANT_CONVERSION = YES;
399 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
400 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
401 | CLANG_WARN_EMPTY_BODY = YES;
402 | CLANG_WARN_ENUM_CONVERSION = YES;
403 | CLANG_WARN_INFINITE_RECURSION = YES;
404 | CLANG_WARN_INT_CONVERSION = YES;
405 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
406 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
407 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
408 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
409 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
410 | CLANG_WARN_STRICT_PROTOTYPES = YES;
411 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
412 | CLANG_WARN_UNREACHABLE_CODE = YES;
413 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
414 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
415 | COPY_PHASE_STRIP = NO;
416 | DEBUG_INFORMATION_FORMAT = dwarf;
417 | ENABLE_STRICT_OBJC_MSGSEND = YES;
418 | ENABLE_TESTABILITY = YES;
419 | GCC_C_LANGUAGE_STANDARD = gnu99;
420 | GCC_DYNAMIC_NO_PIC = NO;
421 | GCC_NO_COMMON_BLOCKS = YES;
422 | GCC_OPTIMIZATION_LEVEL = 0;
423 | GCC_PREPROCESSOR_DEFINITIONS = (
424 | "DEBUG=1",
425 | "$(inherited)",
426 | );
427 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
428 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
429 | GCC_WARN_UNDECLARED_SELECTOR = YES;
430 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
431 | GCC_WARN_UNUSED_FUNCTION = YES;
432 | GCC_WARN_UNUSED_VARIABLE = YES;
433 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
434 | MTL_ENABLE_DEBUG_INFO = YES;
435 | ONLY_ACTIVE_ARCH = YES;
436 | SDKROOT = iphoneos;
437 | TARGETED_DEVICE_FAMILY = "1,2";
438 | };
439 | name = Debug;
440 | };
441 | 97C147041CF9000F007C117D /* Release */ = {
442 | isa = XCBuildConfiguration;
443 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
444 | buildSettings = {
445 | ALWAYS_SEARCH_USER_PATHS = NO;
446 | CLANG_ANALYZER_NONNULL = YES;
447 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
448 | CLANG_CXX_LIBRARY = "libc++";
449 | CLANG_ENABLE_MODULES = YES;
450 | CLANG_ENABLE_OBJC_ARC = YES;
451 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
452 | CLANG_WARN_BOOL_CONVERSION = YES;
453 | CLANG_WARN_COMMA = YES;
454 | CLANG_WARN_CONSTANT_CONVERSION = YES;
455 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
456 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
457 | CLANG_WARN_EMPTY_BODY = YES;
458 | CLANG_WARN_ENUM_CONVERSION = YES;
459 | CLANG_WARN_INFINITE_RECURSION = YES;
460 | CLANG_WARN_INT_CONVERSION = YES;
461 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
462 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
463 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
464 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
465 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
466 | CLANG_WARN_STRICT_PROTOTYPES = YES;
467 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
468 | CLANG_WARN_UNREACHABLE_CODE = YES;
469 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
470 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
471 | COPY_PHASE_STRIP = NO;
472 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
473 | ENABLE_NS_ASSERTIONS = NO;
474 | ENABLE_STRICT_OBJC_MSGSEND = YES;
475 | GCC_C_LANGUAGE_STANDARD = gnu99;
476 | GCC_NO_COMMON_BLOCKS = YES;
477 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
478 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
479 | GCC_WARN_UNDECLARED_SELECTOR = YES;
480 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
481 | GCC_WARN_UNUSED_FUNCTION = YES;
482 | GCC_WARN_UNUSED_VARIABLE = YES;
483 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
484 | MTL_ENABLE_DEBUG_INFO = NO;
485 | SDKROOT = iphoneos;
486 | SUPPORTED_PLATFORMS = iphoneos;
487 | TARGETED_DEVICE_FAMILY = "1,2";
488 | VALIDATE_PRODUCT = YES;
489 | };
490 | name = Release;
491 | };
492 | 97C147061CF9000F007C117D /* Debug */ = {
493 | isa = XCBuildConfiguration;
494 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
495 | buildSettings = {
496 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
497 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
498 | ENABLE_BITCODE = NO;
499 | FRAMEWORK_SEARCH_PATHS = (
500 | "$(inherited)",
501 | "$(PROJECT_DIR)/Flutter",
502 | );
503 | INFOPLIST_FILE = Runner/Info.plist;
504 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
505 | LIBRARY_SEARCH_PATHS = (
506 | "$(inherited)",
507 | "$(PROJECT_DIR)/Flutter",
508 | );
509 | PRODUCT_BUNDLE_IDENTIFIER = com.lib.fps.fpsExample;
510 | PRODUCT_NAME = "$(TARGET_NAME)";
511 | VERSIONING_SYSTEM = "apple-generic";
512 | };
513 | name = Debug;
514 | };
515 | 97C147071CF9000F007C117D /* Release */ = {
516 | isa = XCBuildConfiguration;
517 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
518 | buildSettings = {
519 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
520 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
521 | ENABLE_BITCODE = NO;
522 | FRAMEWORK_SEARCH_PATHS = (
523 | "$(inherited)",
524 | "$(PROJECT_DIR)/Flutter",
525 | );
526 | INFOPLIST_FILE = Runner/Info.plist;
527 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
528 | LIBRARY_SEARCH_PATHS = (
529 | "$(inherited)",
530 | "$(PROJECT_DIR)/Flutter",
531 | );
532 | PRODUCT_BUNDLE_IDENTIFIER = com.lib.fps.fpsExample;
533 | PRODUCT_NAME = "$(TARGET_NAME)";
534 | VERSIONING_SYSTEM = "apple-generic";
535 | };
536 | name = Release;
537 | };
538 | /* End XCBuildConfiguration section */
539 |
540 | /* Begin XCConfigurationList section */
541 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
542 | isa = XCConfigurationList;
543 | buildConfigurations = (
544 | 97C147031CF9000F007C117D /* Debug */,
545 | 97C147041CF9000F007C117D /* Release */,
546 | 249021D3217E4FDB00AE95B9 /* Profile */,
547 | );
548 | defaultConfigurationIsVisible = 0;
549 | defaultConfigurationName = Release;
550 | };
551 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
552 | isa = XCConfigurationList;
553 | buildConfigurations = (
554 | 97C147061CF9000F007C117D /* Debug */,
555 | 97C147071CF9000F007C117D /* Release */,
556 | 249021D4217E4FDB00AE95B9 /* Profile */,
557 | );
558 | defaultConfigurationIsVisible = 0;
559 | defaultConfigurationName = Release;
560 | };
561 | /* End XCConfigurationList section */
562 | };
563 | rootObject = 97C146E61CF9000F007C117D /* Project object */;
564 | }
565 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/ios/Runner/AppDelegate.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | @interface AppDelegate : FlutterAppDelegate
5 |
6 | @end
7 |
--------------------------------------------------------------------------------
/example/ios/Runner/AppDelegate.m:
--------------------------------------------------------------------------------
1 | #import "AppDelegate.h"
2 | #import "GeneratedPluginRegistrant.h"
3 |
4 | @implementation AppDelegate
5 |
6 | - (BOOL)application:(UIApplication *)application
7 | didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
8 | [GeneratedPluginRegistrant registerWithRegistry:self];
9 | // Override point for customization after application launch.
10 | return [super application:application didFinishLaunchingWithOptions:launchOptions];
11 | }
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "Icon-App-20x20@2x.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "Icon-App-20x20@3x.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "Icon-App-29x29@1x.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "Icon-App-29x29@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "29x29",
29 | "idiom" : "iphone",
30 | "filename" : "Icon-App-29x29@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "Icon-App-40x40@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "40x40",
41 | "idiom" : "iphone",
42 | "filename" : "Icon-App-40x40@3x.png",
43 | "scale" : "3x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "Icon-App-60x60@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "60x60",
53 | "idiom" : "iphone",
54 | "filename" : "Icon-App-60x60@3x.png",
55 | "scale" : "3x"
56 | },
57 | {
58 | "size" : "20x20",
59 | "idiom" : "ipad",
60 | "filename" : "Icon-App-20x20@1x.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "20x20",
65 | "idiom" : "ipad",
66 | "filename" : "Icon-App-20x20@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "29x29",
71 | "idiom" : "ipad",
72 | "filename" : "Icon-App-29x29@1x.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "29x29",
77 | "idiom" : "ipad",
78 | "filename" : "Icon-App-29x29@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "40x40",
83 | "idiom" : "ipad",
84 | "filename" : "Icon-App-40x40@1x.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "40x40",
89 | "idiom" : "ipad",
90 | "filename" : "Icon-App-40x40@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "76x76",
95 | "idiom" : "ipad",
96 | "filename" : "Icon-App-76x76@1x.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "76x76",
101 | "idiom" : "ipad",
102 | "filename" : "Icon-App-76x76@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "83.5x83.5",
107 | "idiom" : "ipad",
108 | "filename" : "Icon-App-83.5x83.5@2x.png",
109 | "scale" : "2x"
110 | },
111 | {
112 | "size" : "1024x1024",
113 | "idiom" : "ios-marketing",
114 | "filename" : "Icon-App-1024x1024@1x.png",
115 | "scale" : "1x"
116 | }
117 | ],
118 | "info" : {
119 | "version" : 1,
120 | "author" : "xcode"
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/allenymt/flutter_fps/33bf542c14301ab65ac376cbd2695ca77a69f8ea/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/allenymt/flutter_fps/33bf542c14301ab65ac376cbd2695ca77a69f8ea/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/allenymt/flutter_fps/33bf542c14301ab65ac376cbd2695ca77a69f8ea/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/allenymt/flutter_fps/33bf542c14301ab65ac376cbd2695ca77a69f8ea/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/allenymt/flutter_fps/33bf542c14301ab65ac376cbd2695ca77a69f8ea/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/allenymt/flutter_fps/33bf542c14301ab65ac376cbd2695ca77a69f8ea/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/allenymt/flutter_fps/33bf542c14301ab65ac376cbd2695ca77a69f8ea/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/allenymt/flutter_fps/33bf542c14301ab65ac376cbd2695ca77a69f8ea/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/allenymt/flutter_fps/33bf542c14301ab65ac376cbd2695ca77a69f8ea/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/allenymt/flutter_fps/33bf542c14301ab65ac376cbd2695ca77a69f8ea/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/allenymt/flutter_fps/33bf542c14301ab65ac376cbd2695ca77a69f8ea/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/allenymt/flutter_fps/33bf542c14301ab65ac376cbd2695ca77a69f8ea/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/allenymt/flutter_fps/33bf542c14301ab65ac376cbd2695ca77a69f8ea/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/allenymt/flutter_fps/33bf542c14301ab65ac376cbd2695ca77a69f8ea/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/allenymt/flutter_fps/33bf542c14301ab65ac376cbd2695ca77a69f8ea/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchImage.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchImage@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "LaunchImage@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/allenymt/flutter_fps/33bf542c14301ab65ac376cbd2695ca77a69f8ea/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/allenymt/flutter_fps/33bf542c14301ab65ac376cbd2695ca77a69f8ea/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/allenymt/flutter_fps/33bf542c14301ab65ac376cbd2695ca77a69f8ea/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md:
--------------------------------------------------------------------------------
1 | # Launch Screen Assets
2 |
3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory.
4 |
5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
--------------------------------------------------------------------------------
/example/ios/Runner/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/example/ios/Runner/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/example/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | fps_example
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | $(FLUTTER_BUILD_NAME)
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UISupportedInterfaceOrientations
30 |
31 | UIInterfaceOrientationPortrait
32 | UIInterfaceOrientationLandscapeLeft
33 | UIInterfaceOrientationLandscapeRight
34 |
35 | UISupportedInterfaceOrientations~ipad
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationPortraitUpsideDown
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 | UIViewControllerBasedStatusBarAppearance
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/example/ios/Runner/main.m:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 | #import "AppDelegate.h"
4 |
5 | int main(int argc, char* argv[]) {
6 | @autoreleasepool {
7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/example/lib/demo.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter/scheduler.dart';
3 |
4 | import 'fps_helper.dart';
5 |
6 | /// do what
7 | /// @author yulun
8 | /// @since 2020-07-17 14:51
9 | /// 尽量在profile模式下测试 ,并且打开performance比对
10 | class TestFpsWidget extends StatefulWidget {
11 | @override
12 | State createState() {
13 | return TestFpsState();
14 | }
15 | }
16 |
17 | class TestFpsState extends State {
18 | int? _currentFps;
19 | late FrameCallback callback;
20 |
21 | @override
22 | initState() {
23 | super.initState();
24 | callback = (timeStamp) {
25 | if (mounted) {
26 | setState(() {
27 | _currentFps = FpsHelper.instance.computeFpsAvg.floor();
28 | });
29 | }
30 | };
31 | SchedulerBinding.instance!.addPersistentFrameCallback(callback);
32 | FpsHelper.instance.start();
33 | }
34 |
35 | @override
36 | dispose() {
37 | super.dispose();
38 | FpsHelper.instance.cancel();
39 | }
40 |
41 | @override
42 | Widget build(BuildContext context) {
43 | return Stack(
44 | children: [
45 | GridView.count(
46 | crossAxisCount: 2,
47 | mainAxisSpacing: 8,
48 | crossAxisSpacing: 8,
49 | padding: EdgeInsets.all(8),
50 | children: List.generate(300, (index) {
51 | return Stack(
52 | children: [
53 | Text('$index'),
54 | ],
55 | );
56 | }),
57 | ),
58 | Positioned(
59 | right: 10,
60 | top: 10,
61 | child: Text(
62 | "fps:$_currentFps",
63 | style: TextStyle(color: Colors.red, fontSize: 20),
64 | ))
65 | ],
66 | );
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/example/lib/fps_helper.dart:
--------------------------------------------------------------------------------
1 | import 'package:performance_fps/fps_computer.dart';
2 |
3 | /// do what
4 | /// @author yulun
5 | /// @since 2020-07-17 19:36
6 | /// 测试辅助类
7 | class FpsHelper {
8 | static FpsHelper? _instance;
9 |
10 | static FpsHelper get instance {
11 | if (_instance == null) {
12 | _instance = FpsHelper._();
13 | }
14 | return _instance!;
15 | }
16 |
17 | FpsHelper._();
18 |
19 | bool? _start;
20 |
21 | start() {
22 | if (_start ?? false) return;
23 | _start = true;
24 | //需要测试可以再打开
25 | // BindingFps.instance.start();
26 | // BindingFps.instance.registerCallBack((fps, dropCount) {
27 | // if (_bindingFpsAvg == 0) {
28 | // _bindingFpsAvg = fps;
29 | // } else {
30 | // _bindingFpsAvg = (fps + _bindingFpsAvg) / 2;
31 | // }
32 | // });
33 |
34 | Fps.instance.registerCallBack((fps, dropCount) {
35 | if (_computeFpsAvg == 0) {
36 | _computeFpsAvg = fps;
37 | } else {
38 | _computeFpsAvg = (fps + _computeFpsAvg) / 2;
39 | }
40 | });
41 | }
42 |
43 | void cancel() {
44 | // BindingFps.instance.cancel();
45 | Fps.instance.cancel();
46 | }
47 |
48 | double _bindingFpsAvg = 0;
49 | double _computeFpsAvg = 0;
50 |
51 | double get bindingFpsAvg => _bindingFpsAvg;
52 |
53 | double get computeFpsAvg => _computeFpsAvg;
54 | }
55 |
--------------------------------------------------------------------------------
/example/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import 'demo.dart';
4 |
5 | void main() {
6 | runApp(MyApp());
7 | }
8 |
9 | class MyApp extends StatefulWidget {
10 | @override
11 | _MyAppState createState() => _MyAppState();
12 | }
13 |
14 | class _MyAppState extends State {
15 | @override
16 | void initState() {
17 | super.initState();
18 | }
19 |
20 | @override
21 | Widget build(BuildContext context) {
22 | return MaterialApp(
23 | home: Scaffold(
24 | appBar: AppBar(
25 | title: const Text('fps example app'),
26 | ),
27 | body: TestFpsWidget(),
28 | ),
29 | );
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/example/pubspec.lock:
--------------------------------------------------------------------------------
1 | # Generated by pub
2 | # See https://dart.dev/tools/pub/glossary#lockfile
3 | packages:
4 | async:
5 | dependency: transitive
6 | description:
7 | name: async
8 | url: "https://pub.flutter-io.cn"
9 | source: hosted
10 | version: "2.8.1"
11 | boolean_selector:
12 | dependency: transitive
13 | description:
14 | name: boolean_selector
15 | url: "https://pub.flutter-io.cn"
16 | source: hosted
17 | version: "2.1.0"
18 | characters:
19 | dependency: transitive
20 | description:
21 | name: characters
22 | url: "https://pub.flutter-io.cn"
23 | source: hosted
24 | version: "1.1.0"
25 | charcode:
26 | dependency: transitive
27 | description:
28 | name: charcode
29 | url: "https://pub.flutter-io.cn"
30 | source: hosted
31 | version: "1.3.1"
32 | clock:
33 | dependency: transitive
34 | description:
35 | name: clock
36 | url: "https://pub.flutter-io.cn"
37 | source: hosted
38 | version: "1.1.0"
39 | collection:
40 | dependency: transitive
41 | description:
42 | name: collection
43 | url: "https://pub.flutter-io.cn"
44 | source: hosted
45 | version: "1.15.0"
46 | cupertino_icons:
47 | dependency: "direct main"
48 | description:
49 | name: cupertino_icons
50 | url: "https://pub.flutter-io.cn"
51 | source: hosted
52 | version: "1.0.4"
53 | fake_async:
54 | dependency: transitive
55 | description:
56 | name: fake_async
57 | url: "https://pub.flutter-io.cn"
58 | source: hosted
59 | version: "1.2.0"
60 | flutter:
61 | dependency: "direct main"
62 | description: flutter
63 | source: sdk
64 | version: "0.0.0"
65 | flutter_test:
66 | dependency: "direct dev"
67 | description: flutter
68 | source: sdk
69 | version: "0.0.0"
70 | matcher:
71 | dependency: transitive
72 | description:
73 | name: matcher
74 | url: "https://pub.flutter-io.cn"
75 | source: hosted
76 | version: "0.12.10"
77 | meta:
78 | dependency: transitive
79 | description:
80 | name: meta
81 | url: "https://pub.flutter-io.cn"
82 | source: hosted
83 | version: "1.7.0"
84 | path:
85 | dependency: transitive
86 | description:
87 | name: path
88 | url: "https://pub.flutter-io.cn"
89 | source: hosted
90 | version: "1.8.0"
91 | performance_fps:
92 | dependency: "direct main"
93 | description:
94 | path: ".."
95 | relative: true
96 | source: path
97 | version: "0.0.7"
98 | sky_engine:
99 | dependency: transitive
100 | description:
101 | path: "."
102 | ref: "2.5.1009"
103 | resolved-ref: "95de0feac16ddc6c43a437ac9c3d57f58bfdc7d1"
104 | url: "ssh://git@gitlab.vdian.net:60022/flutter/sky_engine.git"
105 | source: git
106 | version: "0.0.99"
107 | source_span:
108 | dependency: transitive
109 | description:
110 | name: source_span
111 | url: "https://pub.flutter-io.cn"
112 | source: hosted
113 | version: "1.8.1"
114 | stack_trace:
115 | dependency: transitive
116 | description:
117 | name: stack_trace
118 | url: "https://pub.flutter-io.cn"
119 | source: hosted
120 | version: "1.10.0"
121 | stream_channel:
122 | dependency: transitive
123 | description:
124 | name: stream_channel
125 | url: "https://pub.flutter-io.cn"
126 | source: hosted
127 | version: "2.1.0"
128 | string_scanner:
129 | dependency: transitive
130 | description:
131 | name: string_scanner
132 | url: "https://pub.flutter-io.cn"
133 | source: hosted
134 | version: "1.1.0"
135 | term_glyph:
136 | dependency: transitive
137 | description:
138 | name: term_glyph
139 | url: "https://pub.flutter-io.cn"
140 | source: hosted
141 | version: "1.2.0"
142 | test_api:
143 | dependency: transitive
144 | description:
145 | name: test_api
146 | url: "https://pub.flutter-io.cn"
147 | source: hosted
148 | version: "0.4.2"
149 | typed_data:
150 | dependency: transitive
151 | description:
152 | name: typed_data
153 | url: "https://pub.flutter-io.cn"
154 | source: hosted
155 | version: "1.3.0"
156 | vector_math:
157 | dependency: transitive
158 | description:
159 | name: vector_math
160 | url: "https://pub.flutter-io.cn"
161 | source: hosted
162 | version: "2.1.0"
163 | sdks:
164 | dart: ">=2.12.0 <3.0.0"
165 | flutter: ">=1.10.0"
166 |
--------------------------------------------------------------------------------
/example/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: fps_example
2 | description: Demonstrates how to use the fps plugin.
3 |
4 | # The following line prevents the package from being accidentally published to
5 | # pub.dev using `pub publish`. This is preferred for private packages.
6 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev
7 |
8 | environment:
9 | sdk: '>=2.12.0 <3.0.0'
10 |
11 | dependencies:
12 | flutter:
13 | sdk: flutter
14 |
15 | # fps:
16 | # When depending on this package from a real application you should use:
17 | # fps: ^x.y.z
18 | # See https://dart.dev/tools/pub/dependencies#version-constraints
19 | # The example app is bundled with the plugin so we use a path dependency on
20 | # the parent directory to use the current plugin's version.
21 | # performance_fps: ^0.0.1
22 | performance_fps:
23 | path: ../
24 |
25 | # The following adds the Cupertino Icons font to your application.
26 | # Use with the CupertinoIcons class for iOS style icons.
27 | cupertino_icons: ^1.0.4
28 |
29 | dev_dependencies:
30 | flutter_test:
31 | sdk: flutter
32 |
33 | # For information on the generic Dart part of this file, see the
34 | # following page: https://dart.dev/tools/pub/pubspec
35 |
36 | # The following section is specific to Flutter.
37 | flutter:
38 |
39 | # The following line ensures that the Material Icons font is
40 | # included with your application, so that you can use the icons in
41 | # the material Icons class.
42 | uses-material-design: true
43 |
44 | # To add assets to your application, add an assets section, like this:
45 | # assets:
46 | # - images/a_dot_burr.jpeg
47 | # - images/a_dot_ham.jpeg
48 |
49 | # An image asset can refer to one or more resolution-specific "variants", see
50 | # https://flutter.dev/assets-and-images/#resolution-aware.
51 |
52 | # For details regarding adding assets from package dependencies, see
53 | # https://flutter.dev/assets-and-images/#from-packages
54 |
55 | # To add custom fonts to your application, add a fonts section here,
56 | # in this "flutter" section. Each entry in this list should have a
57 | # "family" key with the font family name, and a "fonts" key with a
58 | # list giving the asset and other descriptors for the font. For
59 | # example:
60 | # fonts:
61 | # - family: Schyler
62 | # fonts:
63 | # - asset: fonts/Schyler-Regular.ttf
64 | # - asset: fonts/Schyler-Italic.ttf
65 | # style: italic
66 | # - family: Trajan Pro
67 | # fonts:
68 | # - asset: fonts/TrajanPro.ttf
69 | # - asset: fonts/TrajanPro_Bold.ttf
70 | # weight: 700
71 | #
72 | # For details regarding fonts from package dependencies,
73 | # see https://flutter.dev/custom-fonts/#from-packages
74 |
--------------------------------------------------------------------------------
/example/test/widget_test.dart:
--------------------------------------------------------------------------------
1 | // This is a basic Flutter widget test.
2 | //
3 | // To perform an interaction with a widget in your test, use the WidgetTester
4 | // utility that Flutter provides. For example, you can send tap and scroll
5 | // gestures. You can also use WidgetTester to find child widgets in the widget
6 | // tree, read text, and verify that the values of widget properties are correct.
7 |
8 | import 'package:flutter/material.dart';
9 | import 'package:flutter_test/flutter_test.dart';
10 |
11 | import 'package:fps_example/main.dart';
12 |
13 | void main() {
14 | testWidgets('Verify Platform version', (WidgetTester tester) async {
15 | // Build our app and trigger a frame.
16 | await tester.pumpWidget(MyApp());
17 |
18 | // Verify that platform version is retrieved.
19 | expect(
20 | find.byWidgetPredicate(
21 | (Widget widget) => widget is Text &&
22 | widget.data!.startsWith('Running on:'),
23 | ),
24 | findsOneWidget,
25 | );
26 | });
27 | }
28 |
--------------------------------------------------------------------------------
/fps.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/ios/.gitignore:
--------------------------------------------------------------------------------
1 | .idea/
2 | .vagrant/
3 | .sconsign.dblite
4 | .svn/
5 |
6 | .DS_Store
7 | *.swp
8 | profile
9 |
10 | DerivedData/
11 | build/
12 | GeneratedPluginRegistrant.h
13 | GeneratedPluginRegistrant.m
14 |
15 | .generated/
16 |
17 | *.pbxuser
18 | *.mode1v3
19 | *.mode2v3
20 | *.perspectivev3
21 |
22 | !default.pbxuser
23 | !default.mode1v3
24 | !default.mode2v3
25 | !default.perspectivev3
26 |
27 | xcuserdata
28 |
29 | *.moved-aside
30 |
31 | *.pyc
32 | *sync/
33 | Icon?
34 | .tags*
35 |
36 | /Flutter/Generated.xcconfig
37 | /Flutter/flutter_export_environment.sh
--------------------------------------------------------------------------------
/ios/Assets/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/allenymt/flutter_fps/33bf542c14301ab65ac376cbd2695ca77a69f8ea/ios/Assets/.gitkeep
--------------------------------------------------------------------------------
/ios/Classes/FpsPlugin.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | @interface FpsPlugin : NSObject
5 | @end
6 |
--------------------------------------------------------------------------------
/ios/Classes/FpsPlugin.m:
--------------------------------------------------------------------------------
1 | #import "FpsPlugin.h"
2 |
3 | @implementation FpsPlugin
4 | + (void)registerWithRegistrar:(NSObject*)registrar {
5 | FlutterMethodChannel* channel = [FlutterMethodChannel
6 | methodChannelWithName:@"fps"
7 | binaryMessenger:[registrar messenger]];
8 | FpsPlugin* instance = [[FpsPlugin alloc] init];
9 | [registrar addMethodCallDelegate:instance channel:channel];
10 | }
11 |
12 | - (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result {
13 | if ([@"getRefreshRate" isEqualToString:call.method]) {
14 | result(@([self getRefreshRate:call.arguments]));
15 | } else {
16 | result(FlutterMethodNotImplemented);
17 | }
18 | }
19 |
20 | - (double)displayRefreshRate:(CADisplayLink *)link {
21 | if (@available(iOS 10.3, *)) {
22 | NSInteger preferredFPS = link.preferredFramesPerSecond; // iOS 10.0
23 |
24 | // From Docs:
25 | // The default value for preferredFramesPerSecond is 0. When this value is 0, the preferred
26 | // frame rate is equal to the maximum refresh rate of the display, as indicated by the
27 | // maximumFramesPerSecond property.
28 |
29 | if (preferredFPS != 0) {
30 | return @(preferredFPS).doubleValue;
31 | }
32 |
33 | return @([UIScreen mainScreen].maximumFramesPerSecond).doubleValue; // iOS 10.3
34 | } else {
35 | return 60.0;
36 | }
37 | }
38 |
39 | - (void)onDisplayLink:(CADisplayLink *)link {
40 | NSLog(@"framesPerSecond:%lf", [self displayRefreshRate:link]);
41 | }
42 |
43 | - (double)getRefreshRate:(NSDictionary *)arguments {
44 | CADisplayLink *link = [CADisplayLink displayLinkWithTarget:self selector:@selector(onDisplayLink:)];
45 | return [self displayRefreshRate:link];
46 | }
47 |
48 |
49 | @end
50 |
--------------------------------------------------------------------------------
/ios/performance_fps.podspec:
--------------------------------------------------------------------------------
1 | #
2 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html.
3 | # Run `pod lib lint fps.podspec' to validate before publishing.
4 | #
5 | Pod::Spec.new do |s|
6 | s.name = 'performance_fps'
7 | s.version = '0.0.1'
8 | s.summary = 'A new flutter plugin project.'
9 | s.description = <<-DESC
10 | A new flutter plugin project.
11 | DESC
12 | s.homepage = 'http://example.com'
13 | s.license = { :file => '../LICENSE' }
14 | s.author = { 'Your Company' => 'email@example.com' }
15 | s.source = { :path => '.' }
16 | s.source_files = 'Classes/**/*'
17 | s.public_header_files = 'Classes/**/*.h'
18 | s.dependency 'Flutter'
19 | s.platform = :ios, '8.0'
20 |
21 | # Flutter.framework does not contain a i386 slice. Only x86_64 simulators are supported.
22 | s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64' }
23 | end
24 |
--------------------------------------------------------------------------------
/lib/binding_fps.dart:
--------------------------------------------------------------------------------
1 | import 'dart:async';
2 | import 'dart:collection';
3 |
4 | import 'package:flutter/cupertino.dart';
5 | import 'package:flutter/scheduler.dart';
6 |
7 | import 'fps_callback.dart';
8 | import 'plugin/fps_plugin.dart';
9 | import 'util/debug_log.dart';
10 |
11 | /// do what
12 | /// @author yulun
13 | /// @since 2020-07-17 11:36
14 | /// 这个统计方式和fps_computer里的不一样,通过监听WidgetsBinding的handleBeginFrame和handleDrawFrame实现
15 | /// handleBeginFrame Called by the engine to prepare the framework to produce a new frame.
16 | /// handleDrawFrame Called by the engine to produce a new frame.
17 | /// 在一秒内计算从begin->draw调用了多少次,次数就是帧数,如果帧数少于手机的渲染帧数,会认为丢失了多少帧
18 | /// 参考文章 https://developer.aliyun.com/article/699875
19 | @Deprecated("统计不准,只有cpu部分,即ui线程 build layout paint部分")
20 | class BindingFps {
21 | /// 单例
22 | static BindingFps? _instance;
23 |
24 | static BindingFps? get instance {
25 | if (_instance == null) {
26 | _instance = BindingFps._();
27 | }
28 | return _instance;
29 | }
30 |
31 | /// 1s里最高120hz了吧
32 | static const MAX_FPS = 120;
33 | Timer? _timer;
34 | ListQueue<_FpsFrame?> _frameQueue = ListQueue(MAX_FPS);
35 | bool? _init;
36 | List _callBackList = [];
37 |
38 | /// 一般手机为60帧
39 | double? _fpsHz;
40 |
41 | BindingFps._();
42 |
43 | start() async {
44 | if (_init ?? false) {
45 | // 避免重复初始化
46 | return;
47 | }
48 | _timer = Timer.periodic(Duration(seconds: 1), (timer) {
49 | //时间达到一秒了,开始计算这一秒的帧率
50 | _calFps();
51 | });
52 | _registerListener();
53 |
54 | // 获取当前手机的fps
55 | if (_fpsHz == null) {
56 | _fpsHz = await FpsPlugin.getRefreshRate;
57 | }
58 |
59 | _init = true;
60 | }
61 |
62 | /// 销毁
63 | cancel() {
64 | _timer?.cancel();
65 | _timer = null;
66 | if (beginCallId != null) {
67 | WidgetsBinding.instance!.cancelFrameCallbackWithId(beginCallId!);
68 | }
69 | drawTimeCallback = null;
70 | }
71 |
72 | /// 注册回调
73 | registerCallBack(FpsCallback back) {
74 | _callBackList.add(back);
75 | }
76 |
77 | unregisterCallBack(FpsCallback back) {
78 | _callBackList.remove(back);
79 | }
80 |
81 | /// 当前帧
82 | _FpsFrame? _currentFrame;
83 |
84 | /// 帧数的id
85 | var frameId = 1;
86 | late FrameCallback beginTimeCallback;
87 | int? beginCallId;
88 | FrameCallback? drawTimeCallback;
89 |
90 | _registerListener() {
91 | beginTimeCallback = (timeStamp) {
92 | // handle begin frame
93 | _beginFrame();
94 |
95 | if (drawTimeCallback != null) {
96 | beginCallId =
97 | WidgetsBinding.instance!.scheduleFrameCallback(beginTimeCallback);
98 | }
99 | };
100 |
101 | // 理论上每一帧应该都是先begin,再draw
102 | // 那有没有可能是上一针没draw完,下一帧begin开始了
103 | beginCallId =
104 | WidgetsBinding.instance!.scheduleFrameCallback(beginTimeCallback);
105 |
106 | drawTimeCallback = (timeStamp) {
107 | // handle draw frame
108 | _drawFrame();
109 | };
110 | WidgetsBinding.instance!.addPersistentFrameCallback(drawTimeCallback!);
111 | }
112 |
113 | _beginFrame() {
114 | if (_currentFrame == null) {
115 | _currentFrame = _FpsFrame(frameId++, frameStartTime: DateTime.now());
116 | } else {
117 | _currentFrame!.clear();
118 | if (frameId > 10000) frameId = 0;
119 | _currentFrame!.frameId = frameId++;
120 | _currentFrame!.frameStartTime = DateTime.now();
121 | }
122 | }
123 |
124 | _drawFrame() {
125 | if (_currentFrame == null || _currentFrame?.frameStartTime == null) {
126 | DebugLog.instance.log("bindingFps ,error not begin");
127 | return;
128 | }
129 |
130 | if ((_currentFrame?.frameId ?? 0) + 1 != frameId) {
131 | DebugLog.instance
132 | .log("bindingFps,error not call draw ,but call begin twice");
133 | return;
134 | }
135 |
136 | _currentFrame!.frameEndTime = DateTime.now();
137 | _frameQueue.addFirst(_currentFrame);
138 | }
139 |
140 | /// 计算fps
141 | _calFps() async {
142 | if (_frameQueue.isEmpty) {
143 | DebugLog.instance.log("bindingFps,NO FRAME");
144 | return;
145 | }
146 |
147 | while (_frameQueue.length > _fpsHz!) {
148 | _frameQueue.removeLast();
149 | }
150 |
151 | var _calFrameQueue = ListQueue(_frameQueue.length);
152 | _calFrameQueue.addAll(_frameQueue);
153 | _frameQueue.clear();
154 | while (_calFrameQueue.length > _fpsHz!) {
155 | _calFrameQueue.removeLast();
156 | }
157 | double drawFrame = _calFrameQueue.length.toDouble();
158 | double dropFrameCount = _fpsHz! - drawFrame;
159 | _callBackList.forEach((callBack) {
160 | callBack(drawFrame.toDouble(), dropFrameCount.toDouble());
161 | });
162 | // DebugLog.instance.log(
163 | // "BindingFps _fpsHz is $_fpsHz drawFrame is $drawFrame,dropFrameCount is $dropFrameCount");
164 | }
165 | }
166 |
167 | class _FpsFrame {
168 | DateTime? frameStartTime;
169 | DateTime? frameEndTime;
170 | int frameId;
171 |
172 | _FpsFrame(this.frameId, {this.frameStartTime, this.frameEndTime});
173 |
174 | int get frameTime => frameEndTime!.millisecond - frameStartTime!.millisecond;
175 |
176 | clear() {
177 | frameStartTime = null;
178 | frameEndTime = null;
179 | frameId = 0;
180 | }
181 | }
182 |
--------------------------------------------------------------------------------
/lib/fps_callback.dart:
--------------------------------------------------------------------------------
1 | /// do what
2 | /// @author yulun
3 | /// @since 2020-07-17 19:03
4 | typedef FpsCallback = void Function(double fps, double dropCount);
5 |
--------------------------------------------------------------------------------
/lib/fps_computer.dart:
--------------------------------------------------------------------------------
1 | import 'dart:collection';
2 | import 'dart:ui';
3 |
4 | import 'package:flutter/scheduler.dart';
5 |
6 | import 'fps_callback.dart';
7 | import 'plugin/fps_plugin.dart';
8 |
9 | ///
10 | /// fps 获取
11 | /// 官方推荐的方式 SchedulerBinding.instance.addTimingsCallback
12 | /// 注意不能和window.onReportTimings一起用,会冲突
13 | /// 其帧率计算方式为 FPS=实际绘制帧数*fpsHz(一般是60hz,也有90,120的)/(实际绘制帧数+丢帧数)
14 | /// 参考文章 https://yrom.net/blog/2019/08/01/how-to-get-fps-in-flutter-app-codes/
15 | class Fps {
16 | /// 单例
17 | static Fps get instance {
18 | if (_instance == null) {
19 | _instance = Fps._();
20 | }
21 | return _instance!;
22 | }
23 |
24 | static Fps? _instance;
25 |
26 | static const _maxFrames = 120; // 最大保存帧数据,100 帧足够了,对于 60 fps 来说
27 | final lastFrames =
28 | ListQueue(_maxFrames); //保存帧数据的队列,约定队头为最后一帧,队尾为开始一帧
29 | TimingsCallback? _timingsCallback;
30 | List _callBackList = [];
31 |
32 | Fps._() {
33 | _timingsCallback = (List timings) {
34 | //异步计算fps
35 | _computeFps(timings);
36 | };
37 | SchedulerBinding.instance!.addTimingsCallback(_timingsCallback!);
38 | }
39 |
40 | registerCallBack(FpsCallback back) {
41 | _callBackList.add(back);
42 | }
43 |
44 | unregisterCallBack(FpsCallback back) {
45 | _callBackList.remove(back);
46 | }
47 |
48 | cancel() {
49 | if (_timingsCallback == null) {
50 | return;
51 | }
52 | SchedulerBinding.instance!.removeTimingsCallback(_timingsCallback!);
53 | }
54 |
55 | /// 一般手机为60帧
56 | double? _fpsHz;
57 |
58 | /// 60帧,那就是16.67ms*1000 微秒
59 | Duration? _frameInterval;
60 |
61 | /// 计算fps
62 | Future _computeFps(List timings) async {
63 | // 假设到达的帧数为1 2 3 4
64 | // 那在lastFrames里就是 4 3 2 1,队尾帧在队头
65 | for (FrameTiming timing in timings) {
66 | lastFrames.addFirst(timing);
67 | }
68 |
69 | // 只保留 maxFrames,超出则移除最早的帧
70 | while (lastFrames.length > _maxFrames) {
71 | lastFrames.removeLast();
72 | }
73 |
74 | var lastFramesSet = [];
75 |
76 | // 获取当前手机的fps
77 | if (_fpsHz == null) {
78 | _fpsHz = await FpsPlugin.getRefreshRate;
79 | }
80 |
81 | //每帧消耗的时间,单位微秒
82 | if (_frameInterval == null) {
83 | _frameInterval =
84 | Duration(microseconds: Duration.microsecondsPerSecond ~/ _fpsHz!);
85 | }
86 |
87 | for (FrameTiming timing in lastFrames) {
88 | //lastFrames 队头是最后的帧,所以第一次取出来的是队尾帧
89 | if (lastFramesSet.isEmpty) {
90 | lastFramesSet.add(timing);
91 | } else {
92 | // 帧排序如下
93 | // frame4 frame3 frame2 frame1
94 | var lastStart = //frame4的build开始,即frame3的rasterFinish,但中间是会有间隔的
95 | lastFramesSet.last.timestampInMicroseconds(FramePhase.buildStart);
96 | // 上面提到的间隔时间
97 | var interval =
98 | lastStart - timing.timestampInMicroseconds(FramePhase.rasterFinish);
99 | //相邻两帧如果开始结束相差时间过大,比如大于 frameInterval * 2,认为是不同绘制时间段产生的
100 | if (interval > (_frameInterval!.inMicroseconds * 2)) {
101 | break; //注意这里是break,这次循环结束了,虽然在同一个队列里,但有可能相邻的两帧不在一个时间段,所以不能放一起计算,有个开源的就是没处理这里
102 | }
103 | lastFramesSet.add(timing);
104 | }
105 | }
106 |
107 | var drawFramesCount = lastFramesSet.length;
108 |
109 | //公式,假设当前手机的FPS = 60帧,1秒渲染了60次
110 | // FPS / 60 = drawCount / (drawFramesCount + droppedCount)
111 | // costCount = (drawFramesCount + droppedCount)
112 | // FPS ≈ 60 * drawFramesCount / costCount
113 | int? droppedCount = 0; //丢帧数
114 |
115 | // 计算总的帧数
116 | var costCount = lastFramesSet.map((frame) {
117 | // 耗时超过 frameInterval 认为是丢帧,以60hz为例
118 | // 15ms ~/ 16ms = 0
119 | // 16ms ~/ 16ms = 0
120 | // 17ms ~/ 16ms = 1
121 | // 所以只要droppedCount大于0 ,认为当前帧是丢帧的
122 | int droppedCount =
123 | (frame.totalSpan.inMicroseconds ~/ _frameInterval!.inMicroseconds);
124 | return droppedCount +
125 | 1; //自己本身绘制的一帧,这里加一是因为认为丢帧了,加1变成2或3,主要看实际消耗的时长,如果是正常帧,那就是0+1=1
126 | }) //这里返回的其实是个list
127 | .fold(
128 | 0, //计算的初始值
129 | (dynamic a, b) =>
130 | a + b); //计算总的帧数,fold就是list[0]+list[1]+....list[list.len-1]
131 |
132 | //丢帧数=总帧数-绘制帧数
133 | droppedCount = costCount - drawFramesCount;
134 | double fps = drawFramesCount * _fpsHz! / costCount; //参考上面那四行公式
135 | // DebugLog.instance.log(
136 | // "computerFps _fpsHz is $_fpsHz drawFrame is $fps,dropFrameCount is $droppedCount");
137 | lastFrames.clear();
138 | _callBackList.forEach((callBack) {
139 | callBack(fps, droppedCount!.toDouble());
140 | });
141 | }
142 | }
143 |
--------------------------------------------------------------------------------
/lib/performance_fps.dart:
--------------------------------------------------------------------------------
1 | /// do what
2 | /// @author yulun
3 | /// @since 2020-07-23 15:59
4 | library performance_fps;
5 |
6 | export 'binding_fps.dart';
7 | export 'fps_callback.dart';
8 | export 'fps_computer.dart';
9 | export 'plugin/fps_plugin.dart';
10 | export 'util/debug_log.dart';
11 |
--------------------------------------------------------------------------------
/lib/plugin/fps_plugin.dart:
--------------------------------------------------------------------------------
1 | /// do what
2 | /// @author yulun
3 | /// @since 2020-07-21 18:11
4 |
5 | import 'dart:async';
6 |
7 | import 'package:flutter/services.dart';
8 |
9 | class FpsPlugin {
10 | static const MethodChannel _channel = const MethodChannel('fps');
11 |
12 | /// 默认为60帧,以手机的实际刷新帧率为准
13 | static Future get getRefreshRate async {
14 | final double fpsHz = await _channel.invokeMethod('getRefreshRate') ?? 60;
15 | return fpsHz;
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/lib/util/debug_log.dart:
--------------------------------------------------------------------------------
1 | /// do what
2 | /// @author yulun
3 | /// @since 2020-07-21 19:17
4 | class DebugLog {
5 | static DebugLog _instance = DebugLog._();
6 |
7 | static DebugLog get instance => _instance;
8 |
9 | bool _debug = false;
10 |
11 | DebugLog._() {
12 | assert(() {
13 | _debug = true;
14 | return true;
15 | }());
16 | }
17 |
18 | void log(String message) {
19 | if (_debug) {
20 | print(message);
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/pubspec.lock:
--------------------------------------------------------------------------------
1 | # Generated by pub
2 | # See https://dart.dev/tools/pub/glossary#lockfile
3 | packages:
4 | async:
5 | dependency: transitive
6 | description:
7 | name: async
8 | url: "https://pub.flutter-io.cn"
9 | source: hosted
10 | version: "2.8.1"
11 | boolean_selector:
12 | dependency: transitive
13 | description:
14 | name: boolean_selector
15 | url: "https://pub.flutter-io.cn"
16 | source: hosted
17 | version: "2.1.0"
18 | characters:
19 | dependency: transitive
20 | description:
21 | name: characters
22 | url: "https://pub.flutter-io.cn"
23 | source: hosted
24 | version: "1.1.0"
25 | charcode:
26 | dependency: transitive
27 | description:
28 | name: charcode
29 | url: "https://pub.flutter-io.cn"
30 | source: hosted
31 | version: "1.3.1"
32 | clock:
33 | dependency: transitive
34 | description:
35 | name: clock
36 | url: "https://pub.flutter-io.cn"
37 | source: hosted
38 | version: "1.1.0"
39 | collection:
40 | dependency: transitive
41 | description:
42 | name: collection
43 | url: "https://pub.flutter-io.cn"
44 | source: hosted
45 | version: "1.15.0"
46 | fake_async:
47 | dependency: transitive
48 | description:
49 | name: fake_async
50 | url: "https://pub.flutter-io.cn"
51 | source: hosted
52 | version: "1.2.0"
53 | flutter:
54 | dependency: "direct main"
55 | description: flutter
56 | source: sdk
57 | version: "0.0.0"
58 | flutter_test:
59 | dependency: "direct dev"
60 | description: flutter
61 | source: sdk
62 | version: "0.0.0"
63 | matcher:
64 | dependency: transitive
65 | description:
66 | name: matcher
67 | url: "https://pub.flutter-io.cn"
68 | source: hosted
69 | version: "0.12.10"
70 | meta:
71 | dependency: transitive
72 | description:
73 | name: meta
74 | url: "https://pub.flutter-io.cn"
75 | source: hosted
76 | version: "1.7.0"
77 | path:
78 | dependency: transitive
79 | description:
80 | name: path
81 | url: "https://pub.flutter-io.cn"
82 | source: hosted
83 | version: "1.8.0"
84 | sky_engine:
85 | dependency: transitive
86 | description:
87 | path: "."
88 | ref: "2.5.1009"
89 | resolved-ref: "95de0feac16ddc6c43a437ac9c3d57f58bfdc7d1"
90 | url: "ssh://git@gitlab.vdian.net:60022/flutter/sky_engine.git"
91 | source: git
92 | version: "0.0.99"
93 | source_span:
94 | dependency: transitive
95 | description:
96 | name: source_span
97 | url: "https://pub.flutter-io.cn"
98 | source: hosted
99 | version: "1.8.1"
100 | stack_trace:
101 | dependency: transitive
102 | description:
103 | name: stack_trace
104 | url: "https://pub.flutter-io.cn"
105 | source: hosted
106 | version: "1.10.0"
107 | stream_channel:
108 | dependency: transitive
109 | description:
110 | name: stream_channel
111 | url: "https://pub.flutter-io.cn"
112 | source: hosted
113 | version: "2.1.0"
114 | string_scanner:
115 | dependency: transitive
116 | description:
117 | name: string_scanner
118 | url: "https://pub.flutter-io.cn"
119 | source: hosted
120 | version: "1.1.0"
121 | term_glyph:
122 | dependency: transitive
123 | description:
124 | name: term_glyph
125 | url: "https://pub.flutter-io.cn"
126 | source: hosted
127 | version: "1.2.0"
128 | test_api:
129 | dependency: transitive
130 | description:
131 | name: test_api
132 | url: "https://pub.flutter-io.cn"
133 | source: hosted
134 | version: "0.4.2"
135 | typed_data:
136 | dependency: transitive
137 | description:
138 | name: typed_data
139 | url: "https://pub.flutter-io.cn"
140 | source: hosted
141 | version: "1.3.0"
142 | vector_math:
143 | dependency: transitive
144 | description:
145 | name: vector_math
146 | url: "https://pub.flutter-io.cn"
147 | source: hosted
148 | version: "2.1.0"
149 | sdks:
150 | dart: ">=2.12.0 <3.0.0"
151 | flutter: ">=1.10.0"
152 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: performance_fps
2 | description: Flutter plugin for calculate fps online on Android and IOS,
3 | its result is the same as flutter performance
4 | version: 0.0.7
5 | homepage: https://github.com/allenyulun/flutter_fps
6 |
7 | environment:
8 | sdk: '>=2.12.0 <3.0.0'
9 | flutter: ">=1.10.0"
10 |
11 | dependencies:
12 | flutter:
13 | sdk: flutter
14 |
15 | dev_dependencies:
16 | flutter_test:
17 | sdk: flutter
18 |
19 | # For information on the generic Dart part of this file, see the
20 | # following page: https://dart.dev/tools/pub/pubspec
21 |
22 | # The following section is specific to Flutter.
23 | flutter:
24 | # This section identifies this Flutter project as a plugin project.
25 | # The 'pluginClass' and Android 'package' identifiers should not ordinarily
26 | # be modified. They are used by the tooling to maintain consistency when
27 | # adding or updating assets for this project.
28 | plugin:
29 | platforms:
30 | android:
31 | package: com.lib.fps.fps
32 | pluginClass: FpsPlugin
33 | ios:
34 | pluginClass: FpsPlugin
35 |
36 | # To add assets to your plugin package, add an assets section, like this:
37 | # assets:
38 | # - images/a_dot_burr.jpeg
39 | # - images/a_dot_ham.jpeg
40 | #
41 | # For details regarding assets in packages, see
42 | # https://flutter.dev/assets-and-images/#from-packages
43 | #
44 | # An image asset can refer to one or more resolution-specific "variants", see
45 | # https://flutter.dev/assets-and-images/#resolution-aware.
46 |
47 | # To add custom fonts to your plugin package, add a fonts section here,
48 | # in this "flutter" section. Each entry in this list should have a
49 | # "family" key with the font family name, and a "fonts" key with a
50 | # list giving the asset and other descriptors for the font. For
51 | # example:
52 | # fonts:
53 | # - family: Schyler
54 | # fonts:
55 | # - asset: fonts/Schyler-Regular.ttf
56 | # - asset: fonts/Schyler-Italic.ttf
57 | # style: italic
58 | # - family: Trajan Pro
59 | # fonts:
60 | # - asset: fonts/TrajanPro.ttf
61 | # - asset: fonts/TrajanPro_Bold.ttf
62 | # weight: 700
63 | #
64 | # For details regarding fonts in packages, see
65 | # https://flutter.dev/custom-fonts/#from-packages
66 |
--------------------------------------------------------------------------------