Skip to content

Commit

Permalink
update screenshots
Browse files Browse the repository at this point in the history
  • Loading branch information
Feichtmeier committed Feb 5, 2024
1 parent 7b0bb2f commit be2348f
Show file tree
Hide file tree
Showing 16 changed files with 536 additions and 508 deletions.
Binary file modified .github/album_dark.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 modified .github/album_light.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 modified .github/full_window_dark.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 modified .github/full_window_light.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 modified .github/local_dark.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 modified .github/local_light.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 modified .github/podcast_dark.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 modified .github/podcast_light.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 modified .github/radio_dark.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 modified .github/radio_light.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 modified .github/wide_window_dark.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 modified .github/wide_window_light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
171 changes: 171 additions & 0 deletions lib/src/settings/about_page.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
import 'package:flutter/material.dart';
import 'package:github/github.dart';
import 'package:provider/provider.dart';
import 'package:ubuntu_service/ubuntu_service.dart';
import 'package:url_launcher/url_launcher.dart';
import 'package:yaru_icons/yaru_icons.dart';
import 'package:yaru_widgets/yaru_widgets.dart';

import '../../build_context_x.dart';
import '../../common.dart';
import '../../constants.dart';
import '../../l10n.dart';
import 'settings_model.dart';

const _kTileSize = 50.0;

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

@override
Widget build(BuildContext context) {
final theme = context.t;
final appName = context.select((SettingsModel m) => m.appName);
final linkStyle = theme.textTheme.bodyLarge
?.copyWith(color: Colors.lightBlue, overflow: TextOverflow.visible);
const maxLines = 3;

return Container(
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.background,
borderRadius: BorderRadius.circular(10),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
YaruDialogTitleBar(
title: Text('${context.l10n.about} ${appName ?? ''}'),
leading: YaruBackButton(
style: YaruBackButtonStyle.rounded,
onPressed: () => Navigator.of(context).pop(),
),
),
Expanded(
child: Padding(
padding: const EdgeInsets.all(kYaruPagePadding),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
TapAbleText(
text:
'MusicPod is made by Frederik Feichtmeier. If you like MusicPod, please sponsor me!',
onTap: () => launchUrl(Uri.parse(kSponsorLink)),
style: linkStyle,
maxLines: maxLines,
),
const SizedBox(
height: kYaruPagePadding,
),
TapAbleText(
onTap: () =>
launchUrl(Uri.parse('https://ko-fi.com/amugofjava')),
text:
'MusicPod uses Podcast Search to find podcasts which is made by Ben Hills, please sponsor him!',
style: linkStyle,
maxLines: maxLines,
),
const SizedBox(
height: kYaruPagePadding,
),
TapAbleText(
onTap: () => launchUrl(
Uri.parse('https://github.com/sponsors/alexmercerind'),
),
text:
'MusicPod uses MediaKit to play Media which is made by Hitesh Kumar Saini, please sponsor him!',
style: linkStyle,
maxLines: maxLines,
),
const SizedBox(
height: kYaruPagePadding,
),
TapAbleText(
onTap: () =>
launchUrl(Uri.parse('https://github.com/kenvandine')),
text:
'MusicPod Snap packaging is made by Ken VanDine, please sponsor him!',
style: linkStyle,
maxLines: maxLines,
),
const SizedBox(
height: 2 * kYaruPagePadding,
),
Text(
context.l10n.contributors,
style: theme.textTheme.bodyLarge,
),
Expanded(
child: FutureBuilder<List<Contributor>>(
future: _loadContributors(),
builder: (context, snapshot) {
if (snapshot.hasData) {
return SizedBox(
height: 300,
child: GridView.builder(
padding:
const EdgeInsets.only(bottom: 20, top: 10),
gridDelegate:
const SliverGridDelegateWithMaxCrossAxisExtent(
maxCrossAxisExtent: _kTileSize,
mainAxisExtent: _kTileSize,
mainAxisSpacing: 10,
crossAxisSpacing: 10,
),
itemCount: snapshot.data!.length,
itemBuilder: (context, index) {
final e = snapshot.data!.elementAt(index);
return InkWell(
borderRadius: BorderRadius.circular(100),
onTap: e.htmlUrl == null
? null
: () => launchUrl(Uri.parse(e.htmlUrl!)),
child: CircleAvatar(
backgroundImage: e.avatarUrl != null
? NetworkImage(
e.avatarUrl!,
)
: null,
child: e.avatarUrl == null
? const YaruPlaceholderIcon(
size: Size.square(_kTileSize),
)
: null,
),
);
},
),
);
} else {
return const Center(
child: Progress(),
);
}
},
),
),
TapAbleText(
style: linkStyle,
onTap: () => launchUrl(Uri.parse(kRepoUrl)),
text:
'Copyright by Frederik Feichtmeier 2023 and onwards - all rights reserved.',
maxLines: maxLines,
),
],
),
),
),
],
),
);
}

Future<List<Contributor>> _loadContributors() async {
final github = getService<GitHub>();
return (await github.repositories
.listContributors(
RepositorySlug.full(kGitHubShortLink),
)
.where((c) => c.type == 'User')
.toList());
}
}
39 changes: 39 additions & 0 deletions lib/src/settings/license_page.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import 'package:flutter/material.dart';
import 'package:yaru_widgets/yaru_widgets.dart';

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

@override
Widget build(BuildContext context) {
return Container(
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.background,
borderRadius: BorderRadius.circular(10),
),
child: ClipRRect(
borderRadius: const BorderRadius.only(
bottomLeft: Radius.circular(8.0),
bottomRight: Radius.circular(8.0),
),
child: Column(
children: [
const YaruDialogTitleBar(),
Expanded(
child: Theme(
data: Theme.of(context).copyWith(
pageTransitionsTheme:
YaruMasterDetailTheme.of(context).landscapeTransitions,
),
child: const Padding(
padding: EdgeInsets.all(kYaruPagePadding),
child: LicensePage(),
),
),
),
],
),
),
);
}
}
Loading

0 comments on commit be2348f

Please sign in to comment.