Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/flutter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ jobs:
- run: dart --version
- run: flutter --version
- run: flutter pub get
- name: enable asset building
run: flutter config --enable-native-assets
- name: Lint analysis
run: dart analyze
- name: Dart format
Expand Down
28 changes: 28 additions & 0 deletions examples/flutter_app/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This file configures the analyzer, which statically analyzes Dart code to
# check for errors, warnings, and lints.
#
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
# invoked from the command line by running `flutter analyze`.

# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
include: package:flutter_lints/flutter.yaml

linter:
# The lint rules applied to this project can be customized in the
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
# included above or to enable additional rules. A list of all available lints
# and their documentation is published at https://dart.dev/lints.
#
# Instead of disabling a lint rule for the entire project in the
# section below, it can also be suppressed for a single line of code
# or a specific dart file by using the `// ignore: name_of_lint` and
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
rules:
# avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule

# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
3 changes: 1 addition & 2 deletions importer/hook/build.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'dart:io';

import 'package:logging/logging.dart';
import 'package:native_assets_cli/native_assets_cli.dart';
import 'package:hooks/hooks.dart';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

similar change needed in flutter_app/hook/build.dart

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tried this, but as flutter_gpu_shaders still uses native assets inside the package, we get a type error for BuildInput and BuildOutput

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a PR for the same bdero/flutter_gpu_shaders#11, once this gets merged will install the latest shaders and update it here


void main(List<String> args) async {
await build(args, (config, output) async {
Expand Down
5 changes: 2 additions & 3 deletions importer/lib/build_hooks.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'dart:io';
import 'package:hooks/hooks.dart';

import 'package:native_assets_cli/native_assets_cli.dart';

void buildModels({
required BuildInput buildInput,
Expand All @@ -26,12 +26,11 @@ void buildModels({
outputFileName =
'${outputFileName.substring(0, outputFileName.lastIndexOf('.'))}.model';

/// dart --enable-experiment=native-assets run flutter_scene_importer:import \
/// run flutter_scene_importer:import \
/// --input <input> --output <output> --working-directory <working-directory>
final importerResult = Process.runSync(
dartExec.toFilePath(),
[
'--enable-experiment=native-assets',
'run',
'flutter_scene_importer:import',
'--input',
Expand Down
54 changes: 27 additions & 27 deletions importer/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ packages:
dependency: transitive
description:
name: crypto
sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab
sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855"
url: "https://pub.dev"
source: hosted
version: "3.0.3"
version: "3.0.6"
fake_async:
dependency: transitive
description:
Expand Down Expand Up @@ -88,30 +88,38 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
hooks:
dependency: "direct main"
description:
name: hooks
sha256: "6274d1fe704962cbb881d437aae11af3e6eecc810da7438cc100c85679b4feb6"
url: "https://pub.dev"
source: hosted
version: "0.20.4"
leak_tracker:
dependency: transitive
description:
name: leak_tracker
sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0"
sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de"
url: "https://pub.dev"
source: hosted
version: "10.0.9"
version: "11.0.2"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573
sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1"
url: "https://pub.dev"
source: hosted
version: "3.0.9"
version: "3.0.10"
leak_tracker_testing:
dependency: transitive
description:
name: leak_tracker_testing
sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1"
url: "https://pub.dev"
source: hosted
version: "3.0.1"
version: "3.0.2"
lints:
dependency: transitive
description:
Expand Down Expand Up @@ -152,14 +160,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.16.0"
native_assets_cli:
dependency: "direct main"
description:
name: native_assets_cli
sha256: "0907c5b85a21ae08dcdd0d2b75061cc614939911c2cab5ac903f35a9fbb2a50b"
url: "https://pub.dev"
source: hosted
version: "0.13.0"
path:
dependency: transitive
description:
Expand All @@ -172,10 +172,10 @@ packages:
dependency: transitive
description:
name: pub_semver
sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c"
sha256: "5bfcf68ca79ef689f8990d1160781b4bad40a3bd5e5218ad4076ddb7f4081585"
url: "https://pub.dev"
source: hosted
version: "2.1.4"
version: "2.2.0"
sky_engine:
dependency: transitive
description: flutter
Expand Down Expand Up @@ -225,26 +225,26 @@ packages:
dependency: transitive
description:
name: test_api
sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd
sha256: "522f00f556e73044315fa4585ec3270f1808a4b186c936e612cab0b565ff1e00"
url: "https://pub.dev"
source: hosted
version: "0.7.4"
version: "0.7.6"
typed_data:
dependency: transitive
description:
name: typed_data
sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c
sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006
url: "https://pub.dev"
source: hosted
version: "1.3.2"
version: "1.4.0"
vector_math:
dependency: "direct main"
description:
name: vector_math
sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b
url: "https://pub.dev"
source: hosted
version: "2.1.4"
version: "2.2.0"
vm_service:
dependency: transitive
description:
Expand All @@ -257,10 +257,10 @@ packages:
dependency: transitive
description:
name: yaml
sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5"
sha256: b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce
url: "https://pub.dev"
source: hosted
version: "3.1.2"
version: "3.1.3"
sdks:
dart: ">=3.7.0 <4.0.0"
dart: ">=3.9.0 <4.0.0"
flutter: ">=3.29.0-1.0.pre.242"
2 changes: 1 addition & 1 deletion importer/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ dependencies:
flutter_gpu:
sdk: flutter
logging: ^1.2.0
native_assets_cli: '>=0.13.0 <0.14.0'
vector_math: ^2.1.4
hooks: ^0.20.4

dev_dependencies:
flutter_test:
Expand Down
3 changes: 2 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,14 @@ dependencies:
#flutter_scene_importer: ^0.9.0-0
flutter_scene_importer:
path: ./importer
hooks: ^0.20.4
native_assets_cli: '>=0.13.0 <0.14.0'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably remove this line

vector_math: ^2.1.4

dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^5.0.0
flutter_lints: ^6.0.0
test: ^1.25.15

flutter:
Expand Down