adding multilingual support
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import 'package:base_project/l10n/app_localizations.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class ReusableDropdownField extends StatelessWidget {
|
||||
@@ -46,9 +47,10 @@ class ReusableDropdownField extends StatelessWidget {
|
||||
),
|
||||
value: (value != null && value!.isNotEmpty) ? value : null,
|
||||
items: [
|
||||
const DropdownMenuItem<String>(
|
||||
DropdownMenuItem<String>(
|
||||
value: '',
|
||||
child: Text('Select an option'),
|
||||
child: Text(
|
||||
AppLocalizations.of(context)!.selectOption),
|
||||
),
|
||||
...options.map<DropdownMenuItem<String>>(
|
||||
(item) => DropdownMenuItem<String>(
|
||||
|
||||
Reference in New Issue
Block a user