-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9a7858f
commit dd3339b
Showing
8 changed files
with
1,048 additions
and
931 deletions.
There are no files selected for viewing
385 changes: 194 additions & 191 deletions
385
lib/app/modules/cards/widgets/create_card_weather.dart
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import 'package:device_info_plus/device_info_plus.dart'; | ||
import 'package:flutter/foundation.dart'; | ||
|
||
class DeviceFeature { | ||
DeviceFeature._internal(); | ||
|
||
static final DeviceFeature _singleton = DeviceFeature._internal(); | ||
|
||
factory DeviceFeature() { | ||
return _singleton; | ||
} | ||
|
||
final _deviceInfoPlugin = DeviceInfoPlugin(); | ||
|
||
AndroidDeviceInfo? _androidDeviceInfo; | ||
|
||
Future<void> init() async { | ||
try { | ||
_androidDeviceInfo = await _deviceInfoPlugin.androidInfo; | ||
} catch (e) { | ||
if (kDebugMode) { | ||
print('Error initializing device info: $e'); | ||
} | ||
} | ||
} | ||
|
||
bool isEdgeToEdgeAvailable() { | ||
return _androidDeviceInfo != null && | ||
_androidDeviceInfo!.version.sdkInt > 28; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters