Open paurakhsharma opened 3 years ago
It doesn't work (leftChild, rightChild slide doesn't work) when I use a RTL locale.
RTL
import 'package:flutter/material.dart'; import 'package:flutter_inner_drawer/inner_drawer.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; void main() { runApp(MyApp()); } class MyApp extends StatelessWidget { // This widget is the root of your application. @override Widget build(BuildContext context) { return MaterialApp( title: 'Flutter Demo', theme: ThemeData( primarySwatch: Colors.blue, visualDensity: VisualDensity.adaptivePlatformDensity, ), supportedLocales: [ Locale('ar'), Locale('en', 'GB') ], localizationsDelegates: [ GlobalMaterialLocalizations.delegate, GlobalWidgetsLocalizations.delegate, ], locale: Locale('ar'), home: HomeScreen(), ); } } class HomeScreen extends StatelessWidget { // Current State of InnerDrawerState final GlobalKey<InnerDrawerState> _innerDrawerKey = GlobalKey<InnerDrawerState>(); @override Widget build(BuildContext context) { return InnerDrawer( key: _innerDrawerKey, onTapClose: true, swipe: true, swipeChild: true, offset: IDOffset.only( right: 0.60, left: 0.60, ), leftAnimationType: InnerDrawerAnimation.static, rightAnimationType: InnerDrawerAnimation.quadratic, backgroundDecoration: BoxDecoration( color: Colors.white, ), leftChild: Container( color: Colors.red, ), rightChild: Container( padding: const EdgeInsets.all(8.0), color: Colors.green, ), scaffold: Scaffold( body: Container( constraints: BoxConstraints.expand(), color: Colors.teal, child: Center(child: Text('center')), ), ), ); } }
If I change locale: Locale('ar'), to locale: Locale('en', 'GB'), it works just fine.
locale: Locale('ar'),
locale: Locale('en', 'GB'),
Any idea how I can get child sliders to work with RTL language?
It doesn't work (leftChild, rightChild slide doesn't work) when I use a
RTL
locale.If I change
locale: Locale('ar'),
tolocale: Locale('en', 'GB'),
it works just fine.Any idea how I can get child sliders to work with RTL language?