|
| 1 | +import 'package:flutter/material.dart'; |
| 2 | +import 'package:flood_mobile/Blocs/theme_bloc/theme_bloc.dart'; |
| 3 | +import 'package:flutter_svg/flutter_svg.dart'; |
| 4 | + |
| 5 | +class AboutScreen extends StatefulWidget { |
| 6 | + final int themeIndex; |
| 7 | + |
| 8 | + const AboutScreen({Key? key, required this.themeIndex}) : super(key: key); |
| 9 | + @override |
| 10 | + _AboutScreenState createState() => _AboutScreenState(); |
| 11 | +} |
| 12 | + |
| 13 | +class _AboutScreenState extends State<AboutScreen> { |
| 14 | + @override |
| 15 | + Widget build(BuildContext context) { |
| 16 | + return Scaffold( |
| 17 | + backgroundColor: ThemeBloc.theme(widget.themeIndex).primaryColor, |
| 18 | + body: SingleChildScrollView( |
| 19 | + child: Padding( |
| 20 | + padding: EdgeInsets.all(22.0), |
| 21 | + child: Column( |
| 22 | + crossAxisAlignment: CrossAxisAlignment.center, |
| 23 | + children: [ |
| 24 | + Container( |
| 25 | + width: double.infinity, |
| 26 | + ), |
| 27 | + Image( |
| 28 | + key: Key('App icon asset image'), |
| 29 | + image: AssetImage( |
| 30 | + 'assets/images/icon.png', |
| 31 | + ), |
| 32 | + width: 150, |
| 33 | + height: 150, |
| 34 | + ), |
| 35 | + Wrap( |
| 36 | + spacing: 10, |
| 37 | + runSpacing: 10, |
| 38 | + children: [ |
| 39 | + SvgPicture.network( |
| 40 | + 'https://img.shields.io/github/v/release/CCExtractor/Flood_Mobile?include_prereleases', |
| 41 | + key: Key('release badge key'), |
| 42 | + ), |
| 43 | + SvgPicture.network( |
| 44 | + 'https://img.shields.io/github/last-commit/CCExtractor/Flood_Mobile?label=commit', |
| 45 | + key: Key('commit badge key'), |
| 46 | + ), |
| 47 | + SvgPicture.network( |
| 48 | + 'https://img.shields.io/github/workflow/status/CCExtractor/Flood_Mobile/Flutter%20CI', |
| 49 | + key: Key('build badge key'), |
| 50 | + ), |
| 51 | + SvgPicture.network( |
| 52 | + 'https://img.shields.io/github/issues/CCExtractor/Flood_Mobile', |
| 53 | + key: Key('issues badge key'), |
| 54 | + ), |
| 55 | + SvgPicture.network( |
| 56 | + 'https://img.shields.io/github/issues-pr/CCExtractor/Flood_Mobile?label=PR', |
| 57 | + key: Key('PR badge key'), |
| 58 | + ) |
| 59 | + ], |
| 60 | + ), |
| 61 | + SizedBox( |
| 62 | + height: 20, |
| 63 | + ), |
| 64 | + Column( |
| 65 | + crossAxisAlignment: CrossAxisAlignment.start, |
| 66 | + children: [ |
| 67 | + Text( |
| 68 | + 'Flood is a monitoring service for various torrent clients. It\'s a Node.js service that communicates with your favorite torrent client and serves a decent mobile UI for administration. This project is based on the original Flood project.', |
| 69 | + key: Key('App info text key'), |
| 70 | + style: TextStyle( |
| 71 | + color: ThemeBloc.theme(widget.themeIndex) |
| 72 | + .textTheme |
| 73 | + .bodyLarge |
| 74 | + ?.color, |
| 75 | + fontSize: 15), |
| 76 | + ), |
| 77 | + SizedBox( |
| 78 | + height: 20, |
| 79 | + ), |
| 80 | + Text( |
| 81 | + 'Feedback', |
| 82 | + style: TextStyle( |
| 83 | + color: ThemeBloc.theme(widget.themeIndex) |
| 84 | + .textTheme |
| 85 | + .bodyLarge |
| 86 | + ?.color, |
| 87 | + fontSize: 20, |
| 88 | + fontWeight: FontWeight.bold), |
| 89 | + ), |
| 90 | + SizedBox( |
| 91 | + height: 10, |
| 92 | + ), |
| 93 | + Text( |
| 94 | + 'If you have a specific issue or bug, please file a GitHub issue. Please join the Flood Discord server to discuss feature requests and implementation details.', |
| 95 | + key: Key('Feedback text key'), |
| 96 | + style: TextStyle( |
| 97 | + color: ThemeBloc.theme(widget.themeIndex) |
| 98 | + .textTheme |
| 99 | + .bodyLarge |
| 100 | + ?.color, |
| 101 | + fontSize: 15), |
| 102 | + ), |
| 103 | + SizedBox( |
| 104 | + height: 20, |
| 105 | + ), |
| 106 | + Text( |
| 107 | + 'More Information', |
| 108 | + style: TextStyle( |
| 109 | + color: ThemeBloc.theme(widget.themeIndex) |
| 110 | + .textTheme |
| 111 | + .bodyLarge |
| 112 | + ?.color, |
| 113 | + fontSize: 20, |
| 114 | + fontWeight: FontWeight.bold), |
| 115 | + ), |
| 116 | + SizedBox( |
| 117 | + height: 10, |
| 118 | + ), |
| 119 | + Text( |
| 120 | + 'Check out the Wiki for more information.', |
| 121 | + key: Key('More info text key'), |
| 122 | + style: TextStyle( |
| 123 | + color: ThemeBloc.theme(widget.themeIndex) |
| 124 | + .textTheme |
| 125 | + .bodyLarge |
| 126 | + ?.color, |
| 127 | + fontSize: 15), |
| 128 | + ), |
| 129 | + SizedBox( |
| 130 | + height: 20, |
| 131 | + ), |
| 132 | + ], |
| 133 | + ) |
| 134 | + ], |
| 135 | + ), |
| 136 | + ), |
| 137 | + ), |
| 138 | + ); |
| 139 | + } |
| 140 | +} |
0 commit comments