Also for time being, I have used easy_localization: 3.0.0 but still the problem is how i support multiple language at once with this package
CodePudding user response:
- Don't use localization for this part - drawer widget - text items
- wrap drawer widget with Directionality widget to prevent it from mirroring and make text in the same place.
- pop the drawer after using switch widget.
Example:
import 'package:flutter/material.dart' as ltr;
drawer: Directionality(
textDirection: ltr.TextDirection.ltr,
child: Container(
color: Colors.lightGreen,
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text('English'),
Text('عربي'),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text('English'),
Text('عربي'),
],
),
],
),
),
),

