31 lines
803 B
Dart
31 lines
803 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:get/get.dart';
|
|
import 'package:IQ/app/global/text_widget.dart';
|
|
|
|
SnackbarController snack(String text) => Get.snackbar(
|
|
'',
|
|
'',
|
|
titleText: Center(
|
|
child: TextWidget(
|
|
text: 'oops_snack'.tr,
|
|
fontSize: 18,
|
|
color: Colors.white,
|
|
),
|
|
),
|
|
messageText: Center(
|
|
child: TextWidget(
|
|
text: text,
|
|
fontSize: 16,
|
|
color: Colors.white,
|
|
),
|
|
),
|
|
backgroundColor: Colors.red.withOpacity(0.5),
|
|
colorText: Colors.white,
|
|
snackPosition: SnackPosition.BOTTOM,
|
|
margin: const EdgeInsets.all(10),
|
|
borderRadius: 10,
|
|
borderColor: Colors.white,
|
|
borderWidth: 1,
|
|
duration: const Duration(seconds: 3),
|
|
);
|