GitXplorerGitXplorer
o

flutter_focus_book_manager

public
28 stars
1 forks
0 issues

Commits

List of commits on branch main.
Unverified
1a9587ffe2700913f4171ab4759b96d9496bf216

chore: update metadata

oorestesgaolin committed 3 years ago
Unverified
0aaca934d3bf544dc33651ec2d2503a361c3a15b

chore: analysis

oorestesgaolin committed 3 years ago
Unverified
be2539dc76ccf91df0ee5588d87886b81284ba04

refactor: rename intent

oorestesgaolin committed 3 years ago
Unverified
ea8b734fe2d602644ee11b98a50c420ce7c20b94

feat: print last key pressed in sandbox

oorestesgaolin committed 3 years ago
Unverified
55fe6f6e753346bdead75486e2d9d013fefd7b26

refactor: use fira code for tree view

oorestesgaolin committed 3 years ago
Unverified
1e834113a32958dd70f6b0065666b9d0b6dce47f

fix: don't override cmd + a

oorestesgaolin committed 3 years ago

README

The README file for this repository.

Book Manager

Project aiming to showcase focus management in Flutter using Actions and Shortcuts widgets.

See demo

screenshot


Getting Started πŸš€

To run:

$ flutter run --target lib/main.dart

Working with Translations 🌐

This project relies on flutter_localizations and follows the official internationalization guide for Flutter.

Adding Strings

  1. To add a new localizable string, open the app_en.arb file at lib/l10n/arb/app_en.arb.
{
    "@@locale": "en",
    "counterAppBarTitle": "Counter",
    "@counterAppBarTitle": {
        "description": "Text shown in the AppBar of the Counter Page"
    }
}
  1. Then add a new key/value and description
{
    "@@locale": "en",
    "counterAppBarTitle": "Counter",
    "@counterAppBarTitle": {
        "description": "Text shown in the AppBar of the Counter Page"
    },
    "helloWorld": "Hello World",
    "@helloWorld": {
        "description": "Hello World Text"
    }
}
  1. Use the new string
import 'package:book_manager/l10n/l10n.dart';

@override
Widget build(BuildContext context) {
  final l10n = context.l10n;
  return Text(l10n.helloWorld);
}

Adding Supported Locales

Update the CFBundleLocalizations array in the Info.plist at ios/Runner/Info.plist to include the new locale.

    ...

    <key>CFBundleLocalizations</key>
	<array>
		<string>en</string>
		<string>es</string>
	</array>

    ...

Adding Translations

  1. For each supported locale, add a new ARB file in lib/l10n/arb.
β”œβ”€β”€ l10n
β”‚   β”œβ”€β”€ arb
β”‚   β”‚   β”œβ”€β”€ app_en.arb
β”‚   β”‚   └── app_es.arb
  1. Add the translated strings to each .arb file:

app_en.arb

{
    "@@locale": "en",
    "counterAppBarTitle": "Counter",
    "@counterAppBarTitle": {
        "description": "Text shown in the AppBar of the Counter Page"
    }
}

app_es.arb

{
    "@@locale": "es",
    "counterAppBarTitle": "Contador",
    "@counterAppBarTitle": {
        "description": "Texto mostrado en la AppBar de la pΓ‘gina del contador"
    }
}