package/flutter-packages/flutter-go-router-example: new package
A Flutter plugin that manages files and interactions with file dialogs. This package contains a dart_plugin_registrant dart file, much like the flutter-gallery package. The build commands contain the three lines from the flutter-gallery package referencing the dart_plugin_registrant dart file. Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com> Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
This commit is contained in:
parent
a1b8cb9016
commit
26ab7ee00a
@ -37,6 +37,7 @@ F: package/flutter-packages/
|
||||
F: package/flutter-packages/flutter-adaptive-scaffold-example/
|
||||
F: package/flutter-packages/flutter-animations-example/
|
||||
F: package/flutter-packages/flutter-dynamic-layouts-example/
|
||||
F: package/flutter-packages/flutter-go-router-example/
|
||||
F: package/flutter-packages/flutter-markdown-example/
|
||||
F: package/flutter-pi/
|
||||
F: package/flutter-sdk-bin/
|
||||
|
@ -10,6 +10,7 @@ if BR2_PACKAGE_FLUTTER_PACKAGES
|
||||
source "package/flutter-packages/flutter-adaptive-scaffold-example/Config.in"
|
||||
source "package/flutter-packages/flutter-animations-example/Config.in"
|
||||
source "package/flutter-packages/flutter-dynamic-layouts-example/Config.in"
|
||||
source "package/flutter-packages/flutter-go-router-example/Config.in"
|
||||
source "package/flutter-packages/flutter-markdown-example/Config.in"
|
||||
endif
|
||||
|
||||
|
@ -0,0 +1,7 @@
|
||||
config BR2_PACKAGE_FLUTTER_GO_ROUTER_EXAMPLE
|
||||
bool "flutter go router example"
|
||||
help
|
||||
A Flutter plugin that manages files and interactions
|
||||
with file dialogs.
|
||||
|
||||
https://github.com/flutter/packages/tree/main/packages/go_router/example
|
@ -0,0 +1 @@
|
||||
../flutter-packages.hash
|
@ -0,0 +1,57 @@
|
||||
################################################################################
|
||||
#
|
||||
# flutter-go-router-example
|
||||
#
|
||||
################################################################################
|
||||
|
||||
FLUTTER_GO_ROUTER_EXAMPLE_VERSION = $(FLUTTER_PACKAGES_VERSION)
|
||||
FLUTTER_GO_ROUTER_EXAMPLE_SITE = $(FLUTTER_PACKAGES_SITE)
|
||||
FLUTTER_GO_ROUTER_EXAMPLE_SITE_METHOD = $(FLUTTER_PACKAGES_SITE_METHOD)
|
||||
FLUTTER_GO_ROUTER_EXAMPLE_SOURCE = $(FLUTTER_PACKAGES_SOURCE)
|
||||
FLUTTER_GO_ROUTER_EXAMPLE_LICENSE = $(FLUTTER_PACKAGES_LICENSE)
|
||||
FLUTTER_GO_ROUTER_EXAMPLE_LICENSE_FILES = $(FLUTTER_PACKAGES_LICENSE_FILES)
|
||||
FLUTTER_GO_ROUTER_EXAMPLE_DL_SUBDIR = $(FLUTTER_PACKAGES_DL_SUBDIR)
|
||||
FLUTTER_GO_ROUTER_EXAMPLE_DEPENDENCIES = $(FLUTTER_PACKAGES_DEPENDENCIES)
|
||||
FLUTTER_GO_ROUTER_EXAMPLE_PKG_NAME = go_router_examples
|
||||
FLUTTER_GO_ROUTER_EXAMPLE_INSTALL_DIR = $(TARGET_DIR)/usr/share/flutter/$(FLUTTER_GO_ROUTER_EXAMPLE_PKG_NAME)/$(FLUTTER_ENGINE_RUNTIME_MODE)
|
||||
FLUTTER_GO_ROUTER_EXAMPLE_SUBDIR = packages/go_router/example
|
||||
|
||||
define FLUTTER_GO_ROUTER_EXAMPLE_CONFIGURE_CMDS
|
||||
cd $(FLUTTER_GO_ROUTER_EXAMPLE_BUILDDIR) && \
|
||||
$(HOST_FLUTTER_SDK_BIN_FLUTTER) clean && \
|
||||
$(HOST_FLUTTER_SDK_BIN_FLUTTER) pub get && \
|
||||
$(HOST_FLUTTER_SDK_BIN_FLUTTER) build bundle
|
||||
endef
|
||||
|
||||
define FLUTTER_GO_ROUTER_EXAMPLE_BUILD_CMDS
|
||||
cd $(FLUTTER_GO_ROUTER_EXAMPLE_BUILDDIR) && \
|
||||
$(HOST_FLUTTER_SDK_BIN_DART_BIN) \
|
||||
-Dflutter.dart_plugin_registrant=file://$(FLUTTER_GO_ROUTER_EXAMPLE_BUILDDIR)/.dart_tool/flutter_build/dart_plugin_registrant.dart \
|
||||
--source file://$(FLUTTER_GO_ROUTER_EXAMPLE_BUILDDIR)/.dart_tool/flutter_build/dart_plugin_registrant.dart \
|
||||
--source package:flutter/src/dart_plugin_registrant.dart \
|
||||
--native-assets $(FLUTTER_GO_ROUTER_EXAMPLE_BUILDDIR)/.dart_tool/flutter_build/*/native_assets.yaml \
|
||||
package:$(FLUTTER_GO_ROUTER_EXAMPLE_PKG_NAME)/main.dart && \
|
||||
$(HOST_FLUTTER_SDK_BIN_ENV) $(FLUTTER_ENGINE_GEN_SNAPSHOT) \
|
||||
--deterministic \
|
||||
--obfuscate \
|
||||
--snapshot_kind=app-aot-elf \
|
||||
--elf=libapp.so \
|
||||
.dart_tool/flutter_build/*/app.dill
|
||||
endef
|
||||
|
||||
define FLUTTER_GO_ROUTER_EXAMPLE_INSTALL_TARGET_CMDS
|
||||
mkdir -p $(FLUTTER_GO_ROUTER_EXAMPLE_INSTALL_DIR)/{data,lib}
|
||||
cp -dprf $(FLUTTER_GO_ROUTER_EXAMPLE_BUILDDIR)/build/flutter_assets $(FLUTTER_GO_ROUTER_EXAMPLE_INSTALL_DIR)/data/
|
||||
|
||||
$(INSTALL) -D -m 0755 $(FLUTTER_GO_ROUTER_EXAMPLE_BUILDDIR)/libapp.so \
|
||||
$(FLUTTER_GO_ROUTER_EXAMPLE_INSTALL_DIR)/lib/libapp.so
|
||||
|
||||
ln -sf /usr/share/flutter/$(FLUTTER_ENGINE_RUNTIME_MODE)/data/icudtl.dat \
|
||||
$(FLUTTER_GO_ROUTER_EXAMPLE_INSTALL_DIR)/data/
|
||||
|
||||
ln -sf /usr/lib/libflutter_engine.so $(FLUTTER_GO_ROUTER_EXAMPLE_INSTALL_DIR)/lib/
|
||||
$(RM) $(FLUTTER_GO_ROUTER_EXAMPLE_INSTALL_DIR)/data/flutter_assets/kernel_blob.bin
|
||||
touch $(FLUTTER_GO_ROUTER_EXAMPLE_INSTALL_DIR)/data/flutter_assets/kernel_blob.bin
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
Loading…
Reference in New Issue
Block a user