Finished Launcher

Everything is smooth and the UI is perfect
This commit is contained in:
Alessandro Autiero
2022-09-14 18:56:43 +02:00
parent 1c6137a4d9
commit c9f99d98d2
2 changed files with 42 additions and 0 deletions

14
lib/src/util/os.dart Normal file
View 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;
}

View 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()
)
)
),
));
}
}