mirror of
https://gitlab.com/comunic/comunicmobile
synced 2025-06-19 08:15:16 +00:00
Can update user public note
This commit is contained in:
@ -2,7 +2,10 @@ import 'package:comunic/utils/intl_utils.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// Ask the user to enter an URL
|
||||
/// Dialog to use to ask the user to enter a value
|
||||
///
|
||||
/// @author Pierre Hubert
|
||||
|
||||
class SingleInputDialog extends StatefulWidget {
|
||||
final String title;
|
||||
final IconData icon;
|
||||
@ -11,6 +14,8 @@ class SingleInputDialog extends StatefulWidget {
|
||||
final bool Function(String) checkInput;
|
||||
final String errorMessage;
|
||||
final bool canBeEmpty;
|
||||
final int maxLines;
|
||||
final int maxLength;
|
||||
|
||||
const SingleInputDialog({
|
||||
Key key,
|
||||
@ -21,10 +26,13 @@ class SingleInputDialog extends StatefulWidget {
|
||||
@required this.checkInput,
|
||||
@required this.errorMessage,
|
||||
this.canBeEmpty = false,
|
||||
this.maxLines = 1,
|
||||
this.maxLength,
|
||||
}) : assert(title != null),
|
||||
assert(label != null),
|
||||
assert(checkInput != null),
|
||||
assert(errorMessage != null),
|
||||
assert(maxLines != null),
|
||||
super(key: key);
|
||||
|
||||
@override
|
||||
@ -51,6 +59,8 @@ class __InputURLDialogState extends State<SingleInputDialog> {
|
||||
content: TextField(
|
||||
controller: _controller,
|
||||
onChanged: (s) => setState(() {}),
|
||||
maxLines: widget.maxLines,
|
||||
maxLength: widget.maxLength,
|
||||
decoration: InputDecoration(
|
||||
icon: widget.icon == null ? null : Icon(widget.icon),
|
||||
alignLabelWithHint: true,
|
||||
|
Reference in New Issue
Block a user