diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index 9d41257bfa79e4fbb26972179c8fedabfa29cead..8c66e6f6e06e2cfbd7a40429f93b0382595fc29c 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -26,7 +26,7 @@ apply plugin: 'kotlin-android' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion 30 + compileSdkVersion 31 sourceSets { main.java.srcDirs += 'src/main/kotlin' @@ -36,7 +36,7 @@ android { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "com.screenshot.example" minSdkVersion 17 - targetSdkVersion 30 + targetSdkVersion 31 versionCode flutterVersionCode.toInteger() versionName flutterVersionName } diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml index cbf4e44504e53f85f23ec11133e19180c8230c47..6cf0566492dd4a474867961ee1123338b8b3803d 100644 --- a/example/android/app/src/main/AndroidManifest.xml +++ b/example/android/app/src/main/AndroidManifest.xml @@ -6,6 +6,7 @@ <activity android:name=".MainActivity" android:launchMode="singleTop" + android:exported="true" android:theme="@style/LaunchTheme" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:hardwareAccelerated="true" diff --git a/example/android/build.gradle b/example/android/build.gradle index c505a8635265e70591a0ef5546d84e1ce44b91ad..f132e37ee368915be0dcc95b94240508d8eec0d4 100644 --- a/example/android/build.gradle +++ b/example/android/build.gradle @@ -1,5 +1,5 @@ buildscript { - ext.kotlin_version = '1.3.50' + ext.kotlin_version = '1.6.0' repositories { google() jcenter() diff --git a/example/lib/main.dart b/example/lib/main.dart index aa89b36e38e0f434448f223f445ec89a5aadb1ae..70eafeaf99aa428e89c36d7d8765939d4c0515ea 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -17,7 +17,7 @@ class MyApp extends StatelessWidget { textTheme: TextTheme( headline6: TextStyle( color: Colors.yellow, - fontSize: 50, + // fontSize: 50, )), // This is the theme of your application. // @@ -79,7 +79,14 @@ class _MyHomePageState extends State<MyHomePage> { border: Border.all(color: Colors.blueAccent, width: 5.0), color: Colors.amberAccent, ), - child: Text("This widget will be captured as an image")), + child: Stack( + children: [ + Image.asset( + 'assets/images/flutter.png', + ), + Text("This widget will be captured as an image"), + ], + )), ), SizedBox( height: 25, @@ -109,9 +116,16 @@ class _MyHomePageState extends State<MyHomePage> { border: Border.all(color: Colors.blueAccent, width: 5.0), color: Colors.redAccent, ), - child: Text( - "This is an invisible widget", - style: Theme.of(context).textTheme.headline6, + child: Stack( + children: [ + Image.asset( + 'assets/images/flutter.png', + ), + Text( + "This is an invisible widget", + style: Theme.of(context).textTheme.headline6, + ), + ], )); screenshotController .captureFromWidget( diff --git a/example/windows/flutter/generated_plugins.cmake b/example/windows/flutter/generated_plugins.cmake index 4d10c2518654eaadbb431f911a1b24860d5b68c6..b93c4c30c16703f640bc38523e56204ade09399e 100644 --- a/example/windows/flutter/generated_plugins.cmake +++ b/example/windows/flutter/generated_plugins.cmake @@ -5,6 +5,9 @@ list(APPEND FLUTTER_PLUGIN_LIST ) +list(APPEND FLUTTER_FFI_PLUGIN_LIST +) + set(PLUGIN_BUNDLED_LIBRARIES) foreach(plugin ${FLUTTER_PLUGIN_LIST}) @@ -13,3 +16,8 @@ foreach(plugin ${FLUTTER_PLUGIN_LIST}) list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>) list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) endforeach(plugin) + +foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) +endforeach(ffi_plugin)