dartlangeditorflutterflutter-appsflutter-examplesflutter-packageflutter-widgetquillquill-deltaquilljsreactquillrich-textrich-text-editorwysiwygwysiwyg-editor
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
727 B
29 lines
727 B
1 year ago
|
import 'package:flutter/material.dart';
|
||
|
import 'package:flutter/widgets.dart';
|
||
|
|
||
1 year ago
|
import '../../../flutter_quill.dart';
|
||
1 year ago
|
import '../extensions/localizations.dart';
|
||
1 year ago
|
|
||
|
class FlutterQuillLocalizationsWidget extends StatelessWidget {
|
||
|
const FlutterQuillLocalizationsWidget({
|
||
|
required this.child,
|
||
|
super.key,
|
||
|
});
|
||
|
|
||
|
final Widget child;
|
||
|
|
||
|
@override
|
||
|
Widget build(BuildContext context) {
|
||
|
final loc = FlutterQuillLocalizations.of(context);
|
||
|
if (loc != null) {
|
||
|
return child;
|
||
|
}
|
||
|
return Localizations(
|
||
1 year ago
|
locale: context.requireQuillSharedConfigurations.locale ??
|
||
1 year ago
|
Localizations.localeOf(context),
|
||
1 year ago
|
delegates: FlutterQuillLocalizations.localizationsDelegates,
|
||
|
child: child,
|
||
|
);
|
||
|
}
|
||
|
}
|