Skip to content

Commit

Permalink
🚀 Added App Info Screen! Fixed #15!
Browse files Browse the repository at this point in the history
  • Loading branch information
omegaui committed Mar 31, 2023
1 parent 1e07ee2 commit e26d957
Show file tree
Hide file tree
Showing 4 changed files with 143 additions and 6 deletions.
Binary file added assets/icon/app_icon_256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/icon/icons8-github-96.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
133 changes: 133 additions & 0 deletions lib/ui/screens/app_info_screen.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
import 'package:animated_text_kit/animated_text_kit.dart';
import 'package:bitsdojo_window/bitsdojo_window.dart';
import 'package:chat_desk/io/app_style.dart';
import 'package:chat_desk/ui/utils.dart';
import 'package:flutter/material.dart';
import 'package:url_launcher/url_launcher_string.dart';

class AppInfoScreen extends StatelessWidget {
const AppInfoScreen({super.key});

@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: currentStyle.getBackground(),
body: SizedBox(
width: MediaQuery.of(context).size.width,
child: Stack(
children: [
Align(
alignment: Alignment.center,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
const SizedBox(height: 250),
ClipRRect(
borderRadius: BorderRadius.circular(20),
child: Image.asset(
"assets/icon/app_icon_256.png",
),
),
const SizedBox(height: 10),
Text(
"chat desk",
style: TextStyle(
fontFamily: "Audiowide",
fontSize: 32,
color: currentStyle.getTextColor(),
),
),
const SizedBox(height: 5),
Text(
"beta-release v0.8",
style: TextStyle(
fontFamily: "Sen",
fontSize: 20,
color: currentStyle.getTextColor(),
),
),
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Text(
"written with ❤️ by",
style: TextStyle(
fontFamily: "Sen",
fontSize: 18,
color: currentStyle.getTextColor(),
),
),
AnimatedTextKit(
animatedTexts: [
ColorizeAnimatedText(
"omegaui",
textStyle: TextStyle(
fontFamily: "Audiowide",
fontSize: 22,
color: currentStyle.getTextColor(),
),
colors: [
Colors.pink,
Colors.grey,
Colors.blue,
Colors.white,
],
),
],
isRepeatingAnimation: true,
repeatForever: true,
),
const SizedBox(height: 30),
],
))
],
),
),
Align(
alignment: Alignment.topRight,
child: Padding(
padding: const EdgeInsets.all(40.0),
child: AppUtils.buildTooltip(
text: "Visit Repo",
child: IconButton(
onPressed: () async {
var url = "https://github.com/omegaui/chat_desk";
if (await canLaunchUrlString(url)) {
await launchUrlString(url);
}
},
iconSize: 48,
icon: Image.asset('assets/icon/icons8-github-96.png'),
),
),
),
),
Align(
alignment: Alignment.topLeft,
child: Padding(
padding: const EdgeInsets.all(40.0),
child: AppUtils.buildTooltip(
text: "Close",
child: IconButton(
onPressed: () => Navigator.pop(context),
iconSize: 24,
icon: Icon(
Icons.close,
color: currentStyle.getTextColor(),
),
),
),
),
),
Align(
alignment: Alignment.center,
child: MoveWindow(),
)
],
),
),
);
}
}
16 changes: 10 additions & 6 deletions lib/ui/window_decoration/title_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import 'package:bitsdojo_window/bitsdojo_window.dart';
import 'package:chat_desk/io/app_style.dart';
import 'package:chat_desk/io/server_handler.dart';
import 'package:chat_desk/main.dart';
import 'package:chat_desk/ui/screens/app_info_screen.dart';
import 'package:chat_desk/ui/screens/home_screen.dart';
import 'package:chat_desk/ui/utils.dart';
import 'package:flutter/material.dart';
Expand All @@ -21,12 +22,15 @@ class TitleBar extends StatelessWidget {
height: 40,
child: Row(
children: [
ClipRRect(
borderRadius: BorderRadius.circular(10),
child: const Image(
image: AssetImage('assets/icon/app_icon_64.png'),
width: 36,
height: 36,
GestureDetector(
onTap: () => Navigator.of(context).push(MaterialPageRoute(builder: (context) => const AppInfoScreen())),
child: ClipRRect(
borderRadius: BorderRadius.circular(10),
child: const Image(
image: AssetImage('assets/icon/app_icon_64.png'),
width: 36,
height: 36,
),
),
),
const SizedBox(width: 10),
Expand Down

0 comments on commit e26d957

Please sign in to comment.