Implemented named constant
This commit is contained in:
@@ -28,4 +28,7 @@ class Constants {
|
|||||||
|
|
||||||
/// Duration in milliseconds for the fade-in animation of texts.
|
/// Duration in milliseconds for the fade-in animation of texts.
|
||||||
static const int fadeInDuration = 300;
|
static const int fadeInDuration = 300;
|
||||||
|
|
||||||
|
/// Duration in milliseconds for the keyboard to fully disappear.
|
||||||
|
static const int kKeyboardDelay = 300;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -298,7 +298,9 @@ class _CreateGameViewState extends State<CreateGameView> {
|
|||||||
),
|
),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
FocusScope.of(context).unfocus();
|
FocusScope.of(context).unfocus();
|
||||||
Future.delayed(const Duration(milliseconds: 300), () {
|
Future.delayed(
|
||||||
|
const Duration(
|
||||||
|
milliseconds: Constants.kKeyboardDelay), () {
|
||||||
_checkAllGameAttributes();
|
_checkAllGameAttributes();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user