Skip to content

Commit

Permalink
Add working example
Browse files Browse the repository at this point in the history
  • Loading branch information
mosuem committed Jan 31, 2025
1 parent 21c0c33 commit 8a14be7
Show file tree
Hide file tree
Showing 12 changed files with 337 additions and 102 deletions.
4 changes: 4 additions & 0 deletions pkgs/intl4x/example_native/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# https://dart.dev/guides/libraries/private-files
# Created by `dart pub`
.dart_tool/
bin/example_native/
2 changes: 2 additions & 0 deletions pkgs/intl4x/example_native/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
A sample command-line application with an entrypoint in `bin/`, library code
in `lib/`, and example unit test in `test/`.
30 changes: 30 additions & 0 deletions pkgs/intl4x/example_native/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This file configures the static analysis results for your project (errors,
# warnings, and lints).
#
# This enables the 'recommended' set of lints from `package:lints`.
# This set helps identify many issues that may lead to problems when running
# or consuming Dart code, and enforces writing Dart using a single, idiomatic
# style and format.
#
# If you want a smaller set of lints you can change this to specify
# 'package:lints/core.yaml'. These are just the most critical lints
# (the recommended set includes the core lints).
# The core lints are also what is used by pub.dev for scoring packages.

include: package:lints/recommended.yaml

# Uncomment the following section to specify additional rules.

# linter:
# rules:
# - camel_case_types

# analyzer:
# exclude:
# - path/to/excluded/files/**

# For more information about the core and recommended set of lints, see
# https://dart.dev/go/core-lints

# For additional information about configuring this file, see
# https://dart.dev/guides/language/analysis-options
5 changes: 5 additions & 0 deletions pkgs/intl4x/example_native/bin/example_native.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import 'package:intl4x/intl4x.dart';

void main(List<String> arguments) {
print(Intl().numberFormat().format(3));
}
14 changes: 14 additions & 0 deletions pkgs/intl4x/example_native/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: example_native
description: A sample application using intl4x.

environment:
sdk: ^3.6.0

publish_to: none

dependencies:
intl4x:
path: ../

dev_dependencies:
lints: ^5.0.0
2 changes: 1 addition & 1 deletion pkgs/intl4x/hook/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
1. Create PR.
2. Run `bash tools/regenerate_bindings.sh`, and fix resulting errors.
3. Update `const version` in `version.dart` to tag.
4. Regenerate hashes using `cd pkgs/intl4x/; dart --enable-experiment=native-assets run tool/regenerate_hashes.dart`.
4. Regenerate hashes using `cd pkgs/intl4x/; dart --enable-experiment=native-assets tool/regenerate_hashes.dart`.
5. Land PR.
Loading

0 comments on commit 8a14be7

Please sign in to comment.