Skip to content

Commit 47bd4c3

Browse files
Create PlatformManager
1 parent 7f1af77 commit 47bd4c3

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

lib/utils/platform_manager.dart

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
import 'dart:io';
3+
4+
class PlatformManager {
5+
static PlatformManager _platform = PlatformManager();
6+
7+
static PlatformManager get instance => _platform;
8+
9+
static void setPlatformInstance(PlatformManager platform) {
10+
_platform = platform;
11+
}
12+
13+
bool isAndroid() => Platform.isAndroid;
14+
bool isIOS() => Platform.isIOS;
15+
}

0 commit comments

Comments
 (0)