From c195ad59c89835812ef4c4e849e2c629483e8e83 Mon Sep 17 00:00:00 2001 From: Juanita <114871036+JuanitaCathy@users.noreply.github.com> Date: Sat, 23 Dec 2023 03:51:09 +0530 Subject: [PATCH] initialize method --- lib/classes/Global.dart | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/lib/classes/Global.dart b/lib/classes/Global.dart index 0b5eb35..014fdac 100644 --- a/lib/classes/Global.dart +++ b/lib/classes/Global.dart @@ -21,4 +21,19 @@ class Global { Map(); //converser mapped to conversation static String myName = ''; static Map cache = Map(); + static void initialize() { + devices = []; + connectedDevices = []; + nearbyService = null; + subscription = null; + receivedDataSubscription = null; + messages = [ + Msg("1", "test", "sent", '2'), + Msg("2", "test2", "sent", '4') + ]; + publicKeys = Map(); + conversations = Map(); + myName = ''; + cache = Map(); + } }