flutter_native_string_res 0.0.1+1 copy "flutter_native_string_res: ^0.0.1+1" to clipboard
flutter_native_string_res: ^0.0.1+1 copied to clipboard

Flutter plugin for getting native string resources on Android and iOS

flutter_native_string_res #

Flutter plugin for getting native string resources

Usage #

Check the example folder for code examples. To get a string resource, create a NativeStringResource instance. The constructor is the following:

  • String androidName: Name of string resource for Android
  • String iOSName: Name of string resource for iOS
  • String iOSPlistName: Name of property list file for iOS (omit the .plist extension)

All of these arguments can be omitted if, e.g., you are only fetching values for one platform.

To get the actual string from the resource, call the value getter of the created instance. Example:

var helloRes = NativeStringResource(
  androidName: 'hello',
  iOSName: 'hello',
  iOSPlistName: 'Test_plist'
);

print(await helloRes.value);

This will print Hello world! in the example project.

Setting values is not supported. Values other than strings are not supported

Maintenance #

This was a quick and dirty plugin I wrote so don't expect updates. Feel free to fork as I won't license this

1
likes
40
pub points
42%
popularity

Publisher

unverified uploader

Flutter plugin for getting native string resources on Android and iOS

Repository (GitHub)
View/report issues

License

Unlicense (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_native_string_res