69 lines
2.2 KiB
Dart
69 lines
2.2 KiB
Dart
import 'package:flutter/material.dart';
|
||
import 'package:url_launcher/url_launcher_string.dart';
|
||
|
||
class AboutWidget extends StatelessWidget {
|
||
const AboutWidget({super.key});
|
||
|
||
@override
|
||
Widget build(BuildContext context) {
|
||
return Column(
|
||
mainAxisSize: MainAxisSize.min,
|
||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||
children: [
|
||
Text('Links & Credits', style: Theme.of(context).textTheme.titleMedium),
|
||
const Divider(),
|
||
_buildCreditItem(
|
||
context,
|
||
title: 'Kuwot App Source',
|
||
description:
|
||
'Source code for this app. Any suggestions or contributions are welcome.',
|
||
url: 'https://github.com/dhemasnurjaya/kuwot-app',
|
||
),
|
||
_buildCreditItem(
|
||
context,
|
||
title: 'Quotes-500K',
|
||
description:
|
||
'Large quotes dataset by Shivali Goel, Rishi Madhok, Shweta Garg. Initially created for "Proposing Contextually Relevant Quotes for Images" journal.',
|
||
url: 'https://github.com/ShivaliGoel/Quotes-500K',
|
||
),
|
||
_buildCreditItem(
|
||
context,
|
||
title: 'Unsplash',
|
||
description:
|
||
'Over 6 million free high-resolution photos and illustrations brought to you by the world’s most generous community of contributors.',
|
||
url: 'https://unsplash.com/',
|
||
),
|
||
],
|
||
);
|
||
}
|
||
|
||
Widget _buildCreditItem(
|
||
BuildContext context, {
|
||
required String title,
|
||
required String description,
|
||
required String url,
|
||
}) {
|
||
return Column(
|
||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||
children: [
|
||
Text(title, style: Theme.of(context).textTheme.titleMedium),
|
||
Text(description),
|
||
const SizedBox(height: 4),
|
||
GestureDetector(
|
||
child: Text(
|
||
url,
|
||
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
|
||
decoration: TextDecoration.underline,
|
||
color: Colors.indigoAccent,
|
||
decorationColor: Colors.indigoAccent,
|
||
),
|
||
),
|
||
onTap: () async {
|
||
await launchUrlString(url);
|
||
},
|
||
),
|
||
const SizedBox(height: 16),
|
||
],
|
||
);
|
||
}
|
||
}
|