Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD

quizapp

quizapp built with flutter & firebase

generated by the very good cli ��


getting started ��

this project contains 2 flavors:

  • development
  • production

to run the desired flavor either use the launch configuration in vscode/android studio or use the following commands:

# development
$ flutter run --flavor development --target lib/main_development.dart

# production
$ flutter run --flavor production --target lib/main_production.dart

*quizapp works on ios and android.


running tests ��

to run all unit and widget tests use the following command:

$ flutter test --test-randomize-ordering-seed random

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:quizapp/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"
    }
}

Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD

Top