mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 03:26:24 +00:00
Make a bunch o' strings translateable
This commit is contained in:
parent
ff879bd14b
commit
32fd8efddc
11 changed files with 88 additions and 79 deletions
|
|
@ -3,6 +3,8 @@ import 'package:flutter/material.dart';
|
|||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:image_picker/image_picker.dart';
|
||||
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
|
||||
import 'dart:async';
|
||||
import 'dart:io';
|
||||
|
||||
|
|
@ -44,12 +46,12 @@ class ImagePickerField extends FormField<File> {
|
|||
field.didChange(image);
|
||||
}
|
||||
|
||||
ImagePickerField({String label = "Attach Image", Function onSaved, bool required = false}) :
|
||||
ImagePickerField(BuildContext context, {String label = "Attach Image", Function onSaved, bool required = false}) :
|
||||
super(
|
||||
onSaved: onSaved,
|
||||
validator: (File img) {
|
||||
if (required && (img == null)) {
|
||||
return "Required";
|
||||
return I18N.of(context).required;
|
||||
}
|
||||
|
||||
return null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue