mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-11-29 23:20:03 +03:00
16 lines
430 B
Dart
Executable File
16 lines
430 B
Dart
Executable File
import 'package:flutter/material.dart';
|
|
|
|
ScaffoldFeatureController showMessage(
|
|
BuildContext context,
|
|
String message, {
|
|
Duration duration = const Duration(seconds: 1),
|
|
}) {
|
|
final width = MediaQuery.of(context).size.width;
|
|
return ScaffoldMessenger.of(context).showSnackBar(SnackBar(
|
|
content: Text(message),
|
|
duration: duration,
|
|
behavior: SnackBarBehavior.floating,
|
|
width: width < 540 ? null : 400,
|
|
));
|
|
}
|