mirror of
https://github.com/Auties00/Reboot-Launcher.git
synced 2026-01-13 11:12:23 +01:00
Finished Launcher
Everything is smooth and the UI is perfect
This commit is contained in:
14
lib/src/util/os.dart
Normal file
14
lib/src/util/os.dart
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
import 'dart:io';
|
||||||
|
|
||||||
|
const int appBarSize = 2;
|
||||||
|
final RegExp _regex = RegExp(r'(?<=\(Build )(.*)(?=\))');
|
||||||
|
|
||||||
|
bool get isWin11 {
|
||||||
|
var result = _regex.firstMatch(Platform.operatingSystemVersion)?.group(1);
|
||||||
|
if(result == null){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
var intBuild = int.tryParse(result);
|
||||||
|
return intBuild != null && intBuild > 22000;
|
||||||
|
}
|
||||||
28
lib/src/widget/window_border.dart
Normal file
28
lib/src/widget/window_border.dart
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
import 'package:bitsdojo_window/bitsdojo_window.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:system_theme/system_theme.dart';
|
||||||
|
|
||||||
|
import '../util/os.dart';
|
||||||
|
|
||||||
|
class WindowBorder extends StatelessWidget {
|
||||||
|
const WindowBorder({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return IgnorePointer(
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
top: 1 / appWindow.scaleFactor
|
||||||
|
),
|
||||||
|
child: Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(10),
|
||||||
|
border: Border.all(
|
||||||
|
color: SystemTheme.accentColor.accent,
|
||||||
|
width: appBarSize.toDouble()
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user