-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from testainers/dev
Version 0.0.2.
- Loading branch information
Showing
13 changed files
with
454 additions
and
263 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:url_launcher/url_launcher_string.dart'; | ||
|
||
/// | ||
/// | ||
/// | ||
class ButtonWidget extends StatelessWidget { | ||
final String label; | ||
final String iconName; | ||
final String? url; | ||
|
||
/// | ||
/// | ||
/// | ||
const ButtonWidget({ | ||
required this.label, | ||
required this.iconName, | ||
this.url, | ||
super.key, | ||
}); | ||
|
||
/// | ||
/// | ||
/// | ||
@override | ||
Widget build(BuildContext context) { | ||
return Padding( | ||
padding: const EdgeInsets.all(8), | ||
child: ElevatedButton( | ||
onPressed: url == null ? null : () => launchUrlString(url!), | ||
child: Row( | ||
mainAxisSize: MainAxisSize.min, | ||
children: <Widget>[ | ||
Image.asset('assets/icons/$iconName.png', height: 16), | ||
const SizedBox(width: 8), | ||
Text(label), | ||
], | ||
), | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
/// | ||
/// | ||
/// | ||
class DescriptionWidget extends StatelessWidget { | ||
final String? imageName; | ||
final List<String> paragraphs; | ||
|
||
/// | ||
/// | ||
/// | ||
const DescriptionWidget({ | ||
this.imageName, | ||
this.paragraphs = const <String>[], | ||
super.key, | ||
}); | ||
|
||
/// | ||
/// | ||
/// | ||
@override | ||
Widget build(BuildContext context) { | ||
return Row( | ||
mainAxisAlignment: MainAxisAlignment.spaceAround, | ||
children: <Widget>[ | ||
Flexible( | ||
child: Column( | ||
mainAxisAlignment: MainAxisAlignment.center, | ||
children: <Widget>[ | ||
if (imageName != null) | ||
Image.asset( | ||
'assets/images/$imageName.png', | ||
) | ||
else | ||
Container(), | ||
], | ||
), | ||
), | ||
Flexible( | ||
child: Column( | ||
children: <Widget>[ | ||
if (paragraphs.isNotEmpty) | ||
...paragraphs.map( | ||
(String paragraph) => Padding( | ||
padding: const EdgeInsets.all(8), | ||
child: Text( | ||
paragraph, | ||
textAlign: TextAlign.center, | ||
style: Theme.of(context) | ||
.textTheme | ||
.bodySmall | ||
?.copyWith(fontSize: 20), | ||
), | ||
), | ||
) | ||
else | ||
Container(), | ||
], | ||
), | ||
), | ||
], | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
/// | ||
/// | ||
/// | ||
class HeaderWidget extends StatelessWidget { | ||
final String label; | ||
|
||
/// | ||
/// | ||
/// | ||
const HeaderWidget( | ||
this.label, { | ||
super.key, | ||
}); | ||
|
||
/// | ||
/// | ||
/// | ||
@override | ||
Widget build(BuildContext context) { | ||
return Text( | ||
label, | ||
style: Theme.of(context).textTheme.titleLarge?.copyWith( | ||
fontSize: 50, | ||
fontWeight: FontWeight.bold, | ||
), | ||
); | ||
} | ||
} |
Oops, something went wrong.