mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-19 05:58:50 +02:00
Added push notifications, FCM.
This commit is contained in:
+12
-4
@@ -2,8 +2,11 @@ import 'package:flushbar/flushbar.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
Future<T> showBar<T>(BuildContext context, String text,
|
||||
{bool isDark = false, Duration duration = const Duration(seconds: 1), bool isDismissible = true}) {
|
||||
Future<T> showBar<T>(BuildContext context, String messageText,
|
||||
{bool isDark = false,
|
||||
Duration duration = const Duration(seconds: 1),
|
||||
bool isDismissible = true,
|
||||
String titleText}) {
|
||||
final bar = Flushbar<T>(
|
||||
boxShadows: [
|
||||
BoxShadow(
|
||||
@@ -14,9 +17,14 @@ Future<T> showBar<T>(BuildContext context, String text,
|
||||
backgroundColor: isDark ? Colors.black : Colors.white,
|
||||
borderRadius: 35,
|
||||
margin: EdgeInsets.all(50),
|
||||
messageText: Text(text,
|
||||
titleText: titleText != null
|
||||
? Text(titleText,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(color: isDark ? Colors.white : Colors.black, fontWeight: FontWeight.bold, fontSize: 24.0))
|
||||
: null,
|
||||
messageText: Text(messageText,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(color: isDark ? Colors.white : Colors.black)),
|
||||
style: TextStyle(color: isDark ? Colors.white : Colors.black, fontSize: 16)),
|
||||
duration: duration,
|
||||
isDismissible: isDismissible,
|
||||
flushbarPosition: FlushbarPosition.TOP,
|
||||
|
||||
Reference in New Issue
Block a user