···11+# Miscellaneous
22+*.class
33+*.log
44+*.pyc
55+*.swp
66+.DS_Store
77+.atom/
88+.buildlog/
99+.history
1010+.svn/
1111+migrate_working_dir/
1212+1313+# IntelliJ related
1414+*.iml
1515+*.ipr
1616+*.iws
1717+.idea/
1818+1919+# The .vscode folder contains launch configuration and tasks you configure in
2020+# VS Code which you may wish to be included in version control, so this line
2121+# is commented out by default.
2222+#.vscode/
2323+2424+# Flutter/Dart/Pub related
2525+**/doc/api/
2626+**/ios/Flutter/.last_build_id
2727+.dart_tool/
2828+.flutter-plugins
2929+.flutter-plugins-dependencies
3030+.packages
3131+.pub-cache/
3232+.pub/
3333+/build/
3434+3535+# Symbolication related
3636+app.*.symbols
3737+3838+# Obfuscation related
3939+app.*.map.json
4040+4141+# Android Studio will place build artifacts here
4242+/android/app/debug
4343+/android/app/profile
4444+/android/app/release
+30
flutter_linux_app/.metadata
···11+# This file tracks properties of this Flutter project.
22+# Used by Flutter tool to assess capabilities and perform upgrades etc.
33+#
44+# This file should be version controlled.
55+66+version:
77+ revision: 52b3dc25f6471c27b2144594abb11c741cb88f57
88+ channel: stable
99+1010+project_type: app
1111+1212+# Tracks metadata for the flutter migrate command
1313+migration:
1414+ platforms:
1515+ - platform: root
1616+ create_revision: 52b3dc25f6471c27b2144594abb11c741cb88f57
1717+ base_revision: 52b3dc25f6471c27b2144594abb11c741cb88f57
1818+ - platform: linux
1919+ create_revision: 52b3dc25f6471c27b2144594abb11c741cb88f57
2020+ base_revision: 52b3dc25f6471c27b2144594abb11c741cb88f57
2121+2222+ # User provided section
2323+2424+ # List of Local paths (relative to this file) that should be
2525+ # ignored by the migrate tool.
2626+ #
2727+ # Files that are not part of the templates will be ignored by default.
2828+ unmanaged_files:
2929+ - 'lib/main.dart'
3030+ - 'ios/Runner.xcodeproj/project.pbxproj'
+16
flutter_linux_app/README.md
···11+# flutter_linux_app
22+33+A new Flutter project.
44+55+## Getting Started
66+77+This project is a starting point for a Flutter application.
88+99+A few resources to get you started if this is your first Flutter project:
1010+1111+- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
1212+- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
1313+1414+For help getting started with Flutter development, view the
1515+[online documentation](https://docs.flutter.dev/), which offers tutorials,
1616+samples, guidance on mobile development, and a full API reference.
+29
flutter_linux_app/analysis_options.yaml
···11+# This file configures the analyzer, which statically analyzes Dart code to
22+# check for errors, warnings, and lints.
33+#
44+# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
55+# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
66+# invoked from the command line by running `flutter analyze`.
77+88+# The following line activates a set of recommended lints for Flutter apps,
99+# packages, and plugins designed to encourage good coding practices.
1010+include: package:flutter_lints/flutter.yaml
1111+1212+linter:
1313+ # The lint rules applied to this project can be customized in the
1414+ # section below to disable rules from the `package:flutter_lints/flutter.yaml`
1515+ # included above or to enable additional rules. A list of all available lints
1616+ # and their documentation is published at
1717+ # https://dart-lang.github.io/linter/lints/index.html.
1818+ #
1919+ # Instead of disabling a lint rule for the entire project in the
2020+ # section below, it can also be suppressed for a single line of code
2121+ # or a specific dart file by using the `// ignore: name_of_lint` and
2222+ # `// ignore_for_file: name_of_lint` syntax on the line or in the file
2323+ # producing the lint.
2424+ rules:
2525+ # avoid_print: false # Uncomment to disable the `avoid_print` rule
2626+ # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
2727+2828+# Additional information about this file can be found at
2929+# https://dart.dev/guides/language/analysis-options
+115
flutter_linux_app/lib/main.dart
···11+import 'package:flutter/material.dart';
22+33+void main() {
44+ runApp(const MyApp());
55+}
66+77+class MyApp extends StatelessWidget {
88+ const MyApp({super.key});
99+1010+ // This widget is the root of your application.
1111+ @override
1212+ Widget build(BuildContext context) {
1313+ return MaterialApp(
1414+ title: 'Flutter Demo',
1515+ theme: ThemeData(
1616+ // This is the theme of your application.
1717+ //
1818+ // Try running your application with "flutter run". You'll see the
1919+ // application has a blue toolbar. Then, without quitting the app, try
2020+ // changing the primarySwatch below to Colors.green and then invoke
2121+ // "hot reload" (press "r" in the console where you ran "flutter run",
2222+ // or simply save your changes to "hot reload" in a Flutter IDE).
2323+ // Notice that the counter didn't reset back to zero; the application
2424+ // is not restarted.
2525+ primarySwatch: Colors.blue,
2626+ ),
2727+ home: const MyHomePage(title: 'Flutter Demo Home Page'),
2828+ );
2929+ }
3030+}
3131+3232+class MyHomePage extends StatefulWidget {
3333+ const MyHomePage({super.key, required this.title});
3434+3535+ // This widget is the home page of your application. It is stateful, meaning
3636+ // that it has a State object (defined below) that contains fields that affect
3737+ // how it looks.
3838+3939+ // This class is the configuration for the state. It holds the values (in this
4040+ // case the title) provided by the parent (in this case the App widget) and
4141+ // used by the build method of the State. Fields in a Widget subclass are
4242+ // always marked "final".
4343+4444+ final String title;
4545+4646+ @override
4747+ State<MyHomePage> createState() => _MyHomePageState();
4848+}
4949+5050+class _MyHomePageState extends State<MyHomePage> {
5151+ int _counter = 0;
5252+5353+ void _incrementCounter() {
5454+ setState(() {
5555+ // This call to setState tells the Flutter framework that something has
5656+ // changed in this State, which causes it to rerun the build method below
5757+ // so that the display can reflect the updated values. If we changed
5858+ // _counter without calling setState(), then the build method would not be
5959+ // called again, and so nothing would appear to happen.
6060+ _counter++;
6161+ });
6262+ }
6363+6464+ @override
6565+ Widget build(BuildContext context) {
6666+ // This method is rerun every time setState is called, for instance as done
6767+ // by the _incrementCounter method above.
6868+ //
6969+ // The Flutter framework has been optimized to make rerunning build methods
7070+ // fast, so that you can just rebuild anything that needs updating rather
7171+ // than having to individually change instances of widgets.
7272+ return Scaffold(
7373+ appBar: AppBar(
7474+ // Here we take the value from the MyHomePage object that was created by
7575+ // the App.build method, and use it to set our appbar title.
7676+ title: Text(widget.title),
7777+ ),
7878+ body: Center(
7979+ // Center is a layout widget. It takes a single child and positions it
8080+ // in the middle of the parent.
8181+ child: Column(
8282+ // Column is also a layout widget. It takes a list of children and
8383+ // arranges them vertically. By default, it sizes itself to fit its
8484+ // children horizontally, and tries to be as tall as its parent.
8585+ //
8686+ // Invoke "debug painting" (press "p" in the console, choose the
8787+ // "Toggle Debug Paint" action from the Flutter Inspector in Android
8888+ // Studio, or the "Toggle Debug Paint" command in Visual Studio Code)
8989+ // to see the wireframe for each widget.
9090+ //
9191+ // Column has various properties to control how it sizes itself and
9292+ // how it positions its children. Here we use mainAxisAlignment to
9393+ // center the children vertically; the main axis here is the vertical
9494+ // axis because Columns are vertical (the cross axis would be
9595+ // horizontal).
9696+ mainAxisAlignment: MainAxisAlignment.center,
9797+ children: <Widget>[
9898+ const Text(
9999+ 'You have pushed the button this many times:',
100100+ ),
101101+ Text(
102102+ '$_counter',
103103+ style: Theme.of(context).textTheme.headline4,
104104+ ),
105105+ ],
106106+ ),
107107+ ),
108108+ floatingActionButton: FloatingActionButton(
109109+ onPressed: _incrementCounter,
110110+ tooltip: 'Increment',
111111+ child: const Icon(Icons.add),
112112+ ), // This trailing comma makes auto-formatting nicer for build methods.
113113+ );
114114+ }
115115+}
···11+# Project-level configuration.
22+cmake_minimum_required(VERSION 3.10)
33+project(runner LANGUAGES CXX)
44+55+# The name of the executable created for the application. Change this to change
66+# the on-disk name of your application.
77+set(BINARY_NAME "flutter_linux_app")
88+# The unique GTK application identifier for this application. See:
99+# https://wiki.gnome.org/HowDoI/ChooseApplicationID
1010+set(APPLICATION_ID "com.example.flutter_linux_app")
1111+1212+# Explicitly opt in to modern CMake behaviors to avoid warnings with recent
1313+# versions of CMake.
1414+cmake_policy(SET CMP0063 NEW)
1515+1616+# Load bundled libraries from the lib/ directory relative to the binary.
1717+set(CMAKE_INSTALL_RPATH "$ORIGIN/lib")
1818+1919+# Root filesystem for cross-building.
2020+if(FLUTTER_TARGET_PLATFORM_SYSROOT)
2121+ set(CMAKE_SYSROOT ${FLUTTER_TARGET_PLATFORM_SYSROOT})
2222+ set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT})
2323+ set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
2424+ set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
2525+ set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
2626+ set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
2727+endif()
2828+2929+# Define build configuration options.
3030+if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
3131+ set(CMAKE_BUILD_TYPE "Debug" CACHE
3232+ STRING "Flutter build mode" FORCE)
3333+ set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
3434+ "Debug" "Profile" "Release")
3535+endif()
3636+3737+# Compilation settings that should be applied to most targets.
3838+#
3939+# Be cautious about adding new options here, as plugins use this function by
4040+# default. In most cases, you should add new options to specific targets instead
4141+# of modifying this function.
4242+function(APPLY_STANDARD_SETTINGS TARGET)
4343+ target_compile_features(${TARGET} PUBLIC cxx_std_14)
4444+ target_compile_options(${TARGET} PRIVATE -Wall -Werror)
4545+ target_compile_options(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:-O3>")
4646+ target_compile_definitions(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:NDEBUG>")
4747+endfunction()
4848+4949+# Flutter library and tool build rules.
5050+set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter")
5151+add_subdirectory(${FLUTTER_MANAGED_DIR})
5252+5353+# System-level dependencies.
5454+find_package(PkgConfig REQUIRED)
5555+pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
5656+5757+add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}")
5858+5959+# Define the application target. To change its name, change BINARY_NAME above,
6060+# not the value here, or `flutter run` will no longer work.
6161+#
6262+# Any new source files that you add to the application should be added here.
6363+add_executable(${BINARY_NAME}
6464+ "main.cc"
6565+ "my_application.cc"
6666+ "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc"
6767+)
6868+6969+# Apply the standard set of build settings. This can be removed for applications
7070+# that need different build settings.
7171+apply_standard_settings(${BINARY_NAME})
7272+7373+# Add dependency libraries. Add any application-specific dependencies here.
7474+target_link_libraries(${BINARY_NAME} PRIVATE flutter)
7575+target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK)
7676+7777+# Run the Flutter tool portions of the build. This must not be removed.
7878+add_dependencies(${BINARY_NAME} flutter_assemble)
7979+8080+# Only the install-generated bundle's copy of the executable will launch
8181+# correctly, since the resources must in the right relative locations. To avoid
8282+# people trying to run the unbundled copy, put it in a subdirectory instead of
8383+# the default top-level location.
8484+set_target_properties(${BINARY_NAME}
8585+ PROPERTIES
8686+ RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/intermediates_do_not_run"
8787+)
8888+8989+# Generated plugin build rules, which manage building the plugins and adding
9090+# them to the application.
9191+include(flutter/generated_plugins.cmake)
9292+9393+9494+# === Installation ===
9595+# By default, "installing" just makes a relocatable bundle in the build
9696+# directory.
9797+set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle")
9898+if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
9999+ set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE)
100100+endif()
101101+102102+# Start with a clean build bundle directory every time.
103103+install(CODE "
104104+ file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\")
105105+ " COMPONENT Runtime)
106106+107107+set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data")
108108+set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib")
109109+110110+install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}"
111111+ COMPONENT Runtime)
112112+113113+install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}"
114114+ COMPONENT Runtime)
115115+116116+install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
117117+ COMPONENT Runtime)
118118+119119+foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES})
120120+ install(FILES "${bundled_library}"
121121+ DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
122122+ COMPONENT Runtime)
123123+endforeach(bundled_library)
124124+125125+# Fully re-copy the assets directory on each build to avoid having stale files
126126+# from a previous install.
127127+set(FLUTTER_ASSET_DIR_NAME "flutter_assets")
128128+install(CODE "
129129+ file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\")
130130+ " COMPONENT Runtime)
131131+install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}"
132132+ DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime)
133133+134134+# Install the AOT library on non-Debug builds only.
135135+if(NOT CMAKE_BUILD_TYPE MATCHES "Debug")
136136+ install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
137137+ COMPONENT Runtime)
138138+endif()
+88
flutter_linux_app/linux/flutter/CMakeLists.txt
···11+# This file controls Flutter-level build steps. It should not be edited.
22+cmake_minimum_required(VERSION 3.10)
33+44+set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral")
55+66+# Configuration provided via flutter tool.
77+include(${EPHEMERAL_DIR}/generated_config.cmake)
88+99+# TODO: Move the rest of this into files in ephemeral. See
1010+# https://github.com/flutter/flutter/issues/57146.
1111+1212+# Serves the same purpose as list(TRANSFORM ... PREPEND ...),
1313+# which isn't available in 3.10.
1414+function(list_prepend LIST_NAME PREFIX)
1515+ set(NEW_LIST "")
1616+ foreach(element ${${LIST_NAME}})
1717+ list(APPEND NEW_LIST "${PREFIX}${element}")
1818+ endforeach(element)
1919+ set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE)
2020+endfunction()
2121+2222+# === Flutter Library ===
2323+# System-level dependencies.
2424+find_package(PkgConfig REQUIRED)
2525+pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
2626+pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0)
2727+pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0)
2828+2929+set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so")
3030+3131+# Published to parent scope for install step.
3232+set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE)
3333+set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE)
3434+set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE)
3535+set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE)
3636+3737+list(APPEND FLUTTER_LIBRARY_HEADERS
3838+ "fl_basic_message_channel.h"
3939+ "fl_binary_codec.h"
4040+ "fl_binary_messenger.h"
4141+ "fl_dart_project.h"
4242+ "fl_engine.h"
4343+ "fl_json_message_codec.h"
4444+ "fl_json_method_codec.h"
4545+ "fl_message_codec.h"
4646+ "fl_method_call.h"
4747+ "fl_method_channel.h"
4848+ "fl_method_codec.h"
4949+ "fl_method_response.h"
5050+ "fl_plugin_registrar.h"
5151+ "fl_plugin_registry.h"
5252+ "fl_standard_message_codec.h"
5353+ "fl_standard_method_codec.h"
5454+ "fl_string_codec.h"
5555+ "fl_value.h"
5656+ "fl_view.h"
5757+ "flutter_linux.h"
5858+)
5959+list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/")
6060+add_library(flutter INTERFACE)
6161+target_include_directories(flutter INTERFACE
6262+ "${EPHEMERAL_DIR}"
6363+)
6464+target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}")
6565+target_link_libraries(flutter INTERFACE
6666+ PkgConfig::GTK
6767+ PkgConfig::GLIB
6868+ PkgConfig::GIO
6969+)
7070+add_dependencies(flutter flutter_assemble)
7171+7272+# === Flutter tool backend ===
7373+# _phony_ is a non-existent file to force this command to run every time,
7474+# since currently there's no way to get a full input/output list from the
7575+# flutter tool.
7676+add_custom_command(
7777+ OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS}
7878+ ${CMAKE_CURRENT_BINARY_DIR}/_phony_
7979+ COMMAND ${CMAKE_COMMAND} -E env
8080+ ${FLUTTER_TOOL_ENVIRONMENT}
8181+ "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh"
8282+ ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE}
8383+ VERBATIM
8484+)
8585+add_custom_target(flutter_assemble DEPENDS
8686+ "${FLUTTER_LIBRARY}"
8787+ ${FLUTTER_LIBRARY_HEADERS}
8888+)
···11+name: flutter_linux_app
22+description: A new Flutter project.
33+44+# The following line prevents the package from being accidentally published to
55+# pub.dev using `flutter pub publish`. This is preferred for private packages.
66+publish_to: 'none' # Remove this line if you wish to publish to pub.dev
77+88+# The following defines the version and build number for your application.
99+# A version number is three numbers separated by dots, like 1.2.43
1010+# followed by an optional build number separated by a +.
1111+# Both the version and the builder number may be overridden in flutter
1212+# build by specifying --build-name and --build-number, respectively.
1313+# In Android, build-name is used as versionName while build-number used as versionCode.
1414+# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
1515+# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion.
1616+# Read more about iOS versioning at
1717+# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
1818+# In Windows, build-name is used as the major, minor, and patch parts
1919+# of the product and file versions while build-number is used as the build suffix.
2020+version: 1.0.0+1
2121+2222+environment:
2323+ sdk: '>=2.18.4 <3.0.0'
2424+2525+# Dependencies specify other packages that your package needs in order to work.
2626+# To automatically upgrade your package dependencies to the latest versions
2727+# consider running `flutter pub upgrade --major-versions`. Alternatively,
2828+# dependencies can be manually updated by changing the version numbers below to
2929+# the latest version available on pub.dev. To see which dependencies have newer
3030+# versions available, run `flutter pub outdated`.
3131+dependencies:
3232+ flutter:
3333+ sdk: flutter
3434+3535+3636+ # The following adds the Cupertino Icons font to your application.
3737+ # Use with the CupertinoIcons class for iOS style icons.
3838+ cupertino_icons: ^1.0.2
3939+4040+dev_dependencies:
4141+ flutter_test:
4242+ sdk: flutter
4343+4444+ # The "flutter_lints" package below contains a set of recommended lints to
4545+ # encourage good coding practices. The lint set provided by the package is
4646+ # activated in the `analysis_options.yaml` file located at the root of your
4747+ # package. See that file for information about deactivating specific lint
4848+ # rules and activating additional ones.
4949+ flutter_lints: ^2.0.0
5050+5151+# For information on the generic Dart part of this file, see the
5252+# following page: https://dart.dev/tools/pub/pubspec
5353+5454+# The following section is specific to Flutter packages.
5555+flutter:
5656+5757+ # The following line ensures that the Material Icons font is
5858+ # included with your application, so that you can use the icons in
5959+ # the material Icons class.
6060+ uses-material-design: true
6161+6262+ # To add assets to your application, add an assets section, like this:
6363+ # assets:
6464+ # - images/a_dot_burr.jpeg
6565+ # - images/a_dot_ham.jpeg
6666+6767+ # An image asset can refer to one or more resolution-specific "variants", see
6868+ # https://flutter.dev/assets-and-images/#resolution-aware
6969+7070+ # For details regarding adding assets from package dependencies, see
7171+ # https://flutter.dev/assets-and-images/#from-packages
7272+7373+ # To add custom fonts to your application, add a fonts section here,
7474+ # in this "flutter" section. Each entry in this list should have a
7575+ # "family" key with the font family name, and a "fonts" key with a
7676+ # list giving the asset and other descriptors for the font. For
7777+ # example:
7878+ # fonts:
7979+ # - family: Schyler
8080+ # fonts:
8181+ # - asset: fonts/Schyler-Regular.ttf
8282+ # - asset: fonts/Schyler-Italic.ttf
8383+ # style: italic
8484+ # - family: Trajan Pro
8585+ # fonts:
8686+ # - asset: fonts/TrajanPro.ttf
8787+ # - asset: fonts/TrajanPro_Bold.ttf
8888+ # weight: 700
8989+ #
9090+ # For details regarding fonts from package dependencies,
9191+ # see https://flutter.dev/custom-fonts/#from-packages
+30
flutter_linux_app/test/widget_test.dart
···11+// This is a basic Flutter widget test.
22+//
33+// To perform an interaction with a widget in your test, use the WidgetTester
44+// utility in the flutter_test package. For example, you can send tap and scroll
55+// gestures. You can also use WidgetTester to find child widgets in the widget
66+// tree, read text, and verify that the values of widget properties are correct.
77+88+import 'package:flutter/material.dart';
99+import 'package:flutter_test/flutter_test.dart';
1010+1111+import 'package:flutter_linux_app/main.dart';
1212+1313+void main() {
1414+ testWidgets('Counter increments smoke test', (WidgetTester tester) async {
1515+ // Build our app and trigger a frame.
1616+ await tester.pumpWidget(const MyApp());
1717+1818+ // Verify that our counter starts at 0.
1919+ expect(find.text('0'), findsOneWidget);
2020+ expect(find.text('1'), findsNothing);
2121+2222+ // Tap the '+' icon and trigger a frame.
2323+ await tester.tap(find.byIcon(Icons.add));
2424+ await tester.pump();
2525+2626+ // Verify that our counter has incremented.
2727+ expect(find.text('0'), findsNothing);
2828+ expect(find.text('1'), findsOneWidget);
2929+ });
3030+}