Install pcre manual
- Download .tar.gz file of last version from https://sourceforge.net/projects/pcre/
- Extract the archive
- Run this commands
./configure
make
make install
dependencies: | |
fluttersdk_wind: ^0.0.2 |
flutter pub add fluttersdk_wind |
import 'dart:developer'; | |
import 'package:flutter/material.dart'; | |
import 'package:medium_story_app/config.dart'; | |
void main() { | |
// Init the default timezone | |
Config.instance.set('timezone', 'Europe/London'); | |
runApp(const MyApp()); | |
} |
class Config { | |
/// The singleton instance. | |
static final Config instance = Config(); | |
/// All of the configuration items. | |
final Map<String, dynamic> _items = <String, dynamic>{}; | |
/// Get the specified configuration value. | |
dynamic get(String key) { | |
return _items[key]; |
class Config { | |
/// All of the configuration items. | |
final Map<String, dynamic> _items = <String, dynamic>{}; | |
/// Get the specified configuration value. | |
dynamic get(String key) { | |
return _items[key]; | |
} | |
/// Set a given configuration value. |
-- Get the default settings of the postgresql | |
select * | |
from pg_settings | |
where name like '%autovacuum%'; | |
-- Get the table specific settings | |
select relname, reloptions | |
from pg_class | |
join pg_namespace on pg_namespace.oid = pg_class.relnamespace | |
where pg_namespace.nspname = 'public' and relam = 2 |
Install pcre manual
./configure
make
make install
The Flutter has a good document for internationalization but this document is so mixed. Today, the Flutter haven’t any language class or function for using your own sentences on the app but you can create your own language provider and use this easiest. In this tutorial, I'll create my own language provider and I'll get my sentences by json files.
I’ll use a clean Flutter project in this tutorial. Let’s create a new Flutter project and clean your main.dart
file for using by this tutorial. In this tutorial, my app have 2 languages which are English and Turkish. The App will show sentences by device language. Let's start!
import 'package:app/pages/home.page.dart'; | |
import 'package:app/pages/login.page.dart'; | |
import 'package:app/services/auth.service.dart'; | |
import 'package:flutter/material.dart'; | |
AuthService appAuth = new AuthService(); | |
void main() async { | |
// Set default home. | |
Widget _defaultHome = new LoginPage(); |