• Stars
    star
    530
  • Rank 83,660 (Top 2 %)
  • Language
    Dart
  • License
    MIT License
  • Created almost 3 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Slide Puzzle

Photo Booth Header

coverage style: very good analysis License: MIT

A slide puzzle built for Flutter Challenge.

Built by Very Good Ventures in partnership with Google.

Created using Very Good CLI.


Getting Started πŸš€

To run the project either use the launch configuration in VSCode/Android Studio or use the following command:

$ flutter run -d chrome

Running Tests πŸ§ͺ

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

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

To view the generated coverage report you can use lcov.

# Generate Coverage Report
$ genhtml coverage/lcov.info -o coverage/

# Open Coverage Report
$ open coverage/index.html

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

More Repositories

1

spacex_demo

A Flutter app that demonstrates how to build a simple app using the SpaceX API created by the Very Good Ventures Team.
Dart
137
star
2

flutter_landmarks

Landmarks SwiftUI demo app, built with Flutter
Dart
111
star
3

chat_location

Flutter Chat Application with location integration using GetStream
Dart
95
star
4

dash_ai_search

Dart
94
star
5

io_crossword

Google I/O 2024 Crossword game built with Flutter, Firebase & Gemini
Dart
90
star
6

bloc_concurrency_demos

3 different demos showing how to use bloc concurrency, before and after the Bloc 7.2.0 update.
Dart
78
star
7

supabase_example

An example Flutter application built with Very Good CLI and Supabase πŸ¦„
Dart
77
star
8

web_socket_counter_flutter

A Flutter real-time counter which integrates with Dart Frog and WebSockets.
Dart
51
star
9

very_good_adventures

Dart
49
star
10

robot_testing

How to use the Robot Testing pattern in Flutter
Dart
45
star
11

flutter_amplify_login

An example Flutter login application built with Very Good CLI and AWS Amplify πŸ¦„
Dart
34
star
12

digital_escape_room

Game powered by Gemini, Flutter and Flame.
Dart
30
star
13

flame_behaviors_pong_example

An example Flame game built with Flame Behaviors
Dart
22
star
14

io_crossword_backend

Google I/O 2024 Crossword game backend built with Firebase, Genkit & Gemini
TypeScript
19
star
15

happy_testing

Flutter project to showcase different testing techniques
Dart
16
star
16

very_good_engineering

Static site for Very Good Engineering created with AstroJS. All of our best practices, tips, tricks, and demos in one convenient place!
Astro
9
star
17

very_good_brand

Official Very Good Ventures Brand Assets πŸ¦„
9
star
18

tile_patcher

Dart
6
star
19

flutter-commercial-roadmap

VGV's Commercial Roadmap for Flutter
6
star
20

very_good_blog_assets

Assets used in blogs at Very Good Ventures πŸ¦„
5
star
21

vehicle_cockpit

Dart
3
star
22

financial_dashboard

Dart
3
star
23

.github

3
star
24

accessibility_example

Dart
3
star
25

airplane_entertainment_system

Dart
2
star
26

nitpicky

Provides VGV style lints, similar to package:pedantic.
Shell
2
star
27

trix

Dart
2
star
28

imgToWebp

TypeScript
1
star
29

mealify_shkpk

Dart
1
star