bm_flutter 0.1.9
bm_flutter: ^0.1.9 copied to clipboard
A Flutter toolkit providing annotation-driven preferences code generation, device security utilities, and reusable UI components.
0.1.9 #
- Fixed a startup race in
BasePreferences/the preferences generator:@Securefields were loaded via a fire-and-forgetgetSecureInternal(...).then(...)insideinitGenerated(), soinit()(and therefore@preResolve/DI setup) could complete before a secure field's real persisted value had actually loaded — leaving it at its just-constructed default in the meantime. Any authorized request built in that window went out with an empty/default token, and a token-refresh handler reading the same not-yet-loaded field could mistake it for "no session" and log the user out without ever calling the network.initGenerated()is nowFuture<void>and every@Securefield is genuinelyawaited before it returns;init()awaitsinitGenerated()in turn. Trades a small amount of extra cold-start latency for closing the race — every consumer needsdart run build_runner buildafter upgrading to regenerate*.pref.g.dartwith the newasyncsignature.
0.1.8 #
- Added
SvgVecBuilder(lib/src/svg_vec_builder.dart) — a build_runnerBuilderthat precompiles each.svgasset into a<name>.svg.vecvector_graphicsbinary, registered via build.yaml withauto_apply: dependentsso it applies automatically to any app depending on this package. Rendering the.svg.vecoutput instead of the raw.svgskipsflutter_svg's runtime XML parsing/tessellation, eliminating jank/memory spikes when many SVG icons mount at once (e.g. list scrolling). Generated.svg.vecfiles are build artifacts and should not be committed.
0.1.7 #
- Replaced minimal example with full production app (Firebase-free): removed
firebase_core,firebase_analytics,firebase_crashlytics,firebase_messaging, andflutter_local_notifications; uses plainrunApp(). - Added
.vscode/launch.jsonwith Debug and Release configurations. - Test credentials (
TEST_EMAIL/TEST_PASSWORD) loaded viaenviedfrom.env— pre-fill the login form in debug builds. - Fixed
WithViewState._buildErrorViewcast: usesAPIError.errorModelAs<ResponseError>()(new inbm_flutter_networking0.1.11) via a private_serverMessage()helper — eliminates the double-cast pattern. - Cleaned up
env.dart/.env: removed stale Firebase notification fields. - iOS minimum deployment target bumped to 15.0.
0.1.6 #
- Replaced the minimal example app with a full production app (
flutter_example) migrated from a real project. - Example uses
bm_flutter: ^0.1.5andbm_flutter_networking: ^0.1.10as direct pub.dev dependencies instead of a git reference. - All imports migrated from the legacy
ld_flutterpackage to the splitbm_flutter/bm_flutter_networkingpackages. - Added
WithViewState.failHandler— a static method onWithViewStatethat mapsAPIErrorto the correctViewStateerror variant (NoNetwork,Unauthorized,ServerError,UnexpectedError). - Updated README with real-world usage examples for
ViewState(BLoC + Freezed integration,WithViewStatewidget),FontHelper/FontRegistry(startup registration,AppFontWeightenum,AppTextStyleswrapper), andDeviceHelper(scaleValuecontext extension, scaling sizes / spacing / radii).
0.1.5 #
- Fixed WASM compatibility: moved builder implementation from
lib/build.darttolib/src/builder.dartso pana no longer flagsanalyzer/source_gen(build-time-only deps) as WASM incompatible for the runtime library. - Updated
build.yamlimport topackage:bm_flutter/src/builder.dart.
0.1.4 #
- Added full platform support (Android, iOS, web, macOS, Windows, Linux).
- Used conditional imports to isolate
jailbreak_root_detectionandroot_jailbreak_snifferto mobile-only compile paths; web and desktop use a lightweight stub. - Declared
platforms:in pubspec.yaml to make platform support explicit on pub.dev.
0.1.3 #
- Added example app for pub.dev scoring.
- Upgraded dependencies:
flutter_secure_storageto 10.3.1,analyzerto 13.0.0,source_gento 4.2.3,build_runnerto 2.15.0, and other transitive updates.
0.1.2 #
- Initial release as
bm_flutter(migrated fromld_flutter). - Annotation-driven preferences code generation via
@GeneratePreferences,@UserDefault, and@Secure. BasePreferenceswith synchronous read/write backed bySharedPreferencesandFlutterSecureStorage.DeviceSecurityHelperfor jailbreak/root detection, debug-mode checks, and signature verification.DeviceHelperfor responsive scaling relative to a baseline device width.ViewStatesealed class covering loading, error, and data states for BLoC-driven screens.LanguageManagerwithSupportedLocaleenum for custom locale resolution.- UI components:
AppCupertinoButton,UnderlinedButton,ErrorView,emptyBlocListener, andpreferencesListener. - Typography helpers:
FontHelper,FontKeyRegistry, andFontWeightProtocol.