dlgPrompt method
- required String title,
Provides the ability to show an input prompt to retrieve an answer to a question. The value is returned back as a string. If a user cancels the action an empty string is returned.
Implementation
Future<String> dlgPrompt({
required String title,
}) async {
var answer = '';
await dlgCustom<String?>(
actions: [
_buildButton<void>("OK"),
],
content: SizedBox(
height: 30.0,
width: 200.0,
child: uiTextField(
onChanged: (v) => answer = v,
style: CInputDecorationTheme(
inputStyle: TextStyle(color: _getTheme().contentColor),
isDense: true,
border: UnderlineInputBorder(
borderSide: BorderSide(color: _getTheme().contentColor!),
),
enabledBorder: UnderlineInputBorder(
borderSide: BorderSide(color: _getTheme().contentColor!),
),
focusedBorder: UnderlineInputBorder(
borderSide: BorderSide(color: _getTheme().contentColor!),
),
),
),
),
title: title,
);
return answer;
}