mirror of
https://github.com/seemoo-lab/openhaystack.git
synced 2026-05-19 06:56:51 +00:00
29 lines
926 B
Dart
29 lines
926 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
class Splashscreen extends StatelessWidget {
|
|
|
|
/// Display a fullscreen splashscreen to cover loading times.
|
|
const Splashscreen({ Key? key }) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
Size screenSize = MediaQuery.of(context).size;
|
|
Orientation orientation = MediaQuery.of(context).orientation;
|
|
|
|
var maxScreen = orientation == Orientation.portrait ? screenSize.width : screenSize.height;
|
|
var maxSize = maxScreen * 0.4;
|
|
|
|
return Scaffold(
|
|
body: Center(
|
|
child: Container(
|
|
constraints: BoxConstraints(maxWidth: maxSize, maxHeight: maxSize),
|
|
// TODO: Update app icon accordingly (https://docs.flutter.dev/development/ui/assets-and-images#platform-assets)
|
|
child: const Image(
|
|
width: 1800,
|
|
image: AssetImage('assets/OpenHaystackIcon.png')),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|