Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…ge_examples

# Conflicts:
#	pubspec.lock
#	pubspec.yaml
  • Loading branch information
lucianojung committed Oct 7, 2023
1 parent 0e582c3 commit 058d939
Show file tree
Hide file tree
Showing 61 changed files with 117 additions and 62 deletions.
Binary file added assets/icons/android-icon-144x144.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/icons/android-icon-192x192.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/icons/android-icon-48x48.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/icons/android-icon-72x72.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/icons/android-icon-96x96.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/icons/apple-icon-114x114.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/icons/apple-icon-120x120.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/icons/apple-icon-144x144.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/icons/apple-icon-152x152.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/icons/apple-icon-180x180.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/icons/apple-icon-57x57.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/icons/apple-icon-60x60.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/icons/apple-icon-72x72.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/icons/apple-icon-76x76.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/icons/apple-icon-precomposed.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/icons/apple-icon.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/icons/favicon-16x16.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/icons/favicon-32x32.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/icons/favicon-96x96.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/icons/favicon.ico
Binary file not shown.
Binary file added assets/icons/ms-icon-144x144.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/icons/ms-icon-150x150.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/icons/ms-icon-310x310.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/icons/ms-icon-70x70.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
78 changes: 39 additions & 39 deletions lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:package_examples/service/MyTheme.dart';
import 'package:package_examples/service/route_generator.dart';
Expand All @@ -18,6 +19,7 @@ class MyApp extends StatelessWidget {
final themeProvider = Provider.of<ThemeProvider>(context);

return MaterialApp(
debugShowCheckedModeBanner: false,
themeMode: themeProvider.themeMode,
theme: MyTheme.lightTheme,
darkTheme: MyTheme.darkTheme,
Expand All @@ -43,10 +45,10 @@ class _HomeViewState extends State<HomeView> {
CustomListTile(Icons.view_agenda_outlined, 'Convex BottomAppBar', '3.0.0',
'/convex_bottom_bar', 2),
CustomListTile(
Icons.calendar_today, 'Date Format', '2.0.2', '/date_format', 3),
CustomListTile(Icons.launch, 'Url Launcher', '6.0.9', '/url_launcher', 4),
Icons.calendar_today, 'Date Format', '2.0.4', '/date_format', 3),
CustomListTile(Icons.launch, 'Url Launcher', '6.0.17', '/url_launcher', 4),
CustomListTile(
Icons.font_download_outlined, 'Google Fonts', '2.1.0', '/google_fonts', 5),
Icons.font_download_outlined, 'Google Fonts', '2.2.0', '/google_fonts', 5),
CustomListTile(Icons.lock_outline, 'Crypto', '3.0.1', '/crypto', 6),
];

Expand All @@ -66,49 +68,47 @@ class _HomeViewState extends State<HomeView> {

Widget _body() {
return SafeArea(
child: Center(
child: Container(
// width: 1280,
child: SingleChildScrollView(
child: Column(
children: <Widget>[
Padding(
padding: const EdgeInsets.only(left: 8.0, top: 8.0),
child: MaterialDropdownView(
value: orderValue,
values: SortingOrder.Alphabetically.names(),
onChangedCallback: (newValue) => _onOrderValueChanged(newValue),
),
),
for (CustomListTile listTile in listTileList)
ListTile(
leading: Icon(listTile.iconData),
title: Text(listTile.title),
subtitle: Text('Version: ${listTile.version}'),
onTap: () {
setState(() {
Navigator.of(context).pushNamed(listTile.route);
});
},
trailing: Icon(Icons.arrow_forward),
),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16.0),
child: Divider(),
child: Container(
// width: 1280,
child: SingleChildScrollView(
child: Column(
children: <Widget>[
Padding(
padding: const EdgeInsets.only(left: 8.0, top: 8.0),
child: MaterialDropdownView(
value: orderValue,
values: SortingOrder.Alphabetically.names(),
onChangedCallback: (newValue) => _onOrderValueChanged(newValue),
),
),
for (CustomListTile listTile in listTileList)
ListTile(
leading: Icon(Icons.assistant),
trailing: Icon(Icons.launch),
title: Text('Upcoming'),
subtitle: Text('...'),
leading: Icon(listTile.iconData),
title: Text(listTile.title),
subtitle: Text('Version: ${listTile.version}'),
onTap: () {
setState(() {
_launchUrl('https://lucianojung.medium.com/');
Navigator.of(context).pushNamed(listTile.route);
});
},
trailing: Icon(Icons.arrow_forward),
),
],
),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16.0),
child: Divider(),
),
ListTile(
leading: Icon(Icons.assistant),
trailing: Icon(Icons.launch),
title: Text('Upcoming'),
subtitle: Text('...'),
onTap: () {
setState(() {
_launchUrl('https://lucianojung.medium.com/');
});
},
),
],
),
),
),
Expand Down
4 changes: 1 addition & 3 deletions lib/packages/date_format/date_format_main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ import 'dart:async';
import 'package:expandable/expandable.dart';
import 'package:flutter/material.dart';
import 'package:date_format/date_format.dart';
import 'package:package_examples/service/MyTheme.dart';
import 'package:package_examples/shared/appbar.dart';
import 'package:package_examples/shared/material_dropdown_view.dart';
import 'package:package_examples/shared/package_weblink_view.dart';
import 'package:package_examples/shared/setting_list.dart';
import 'package:provider/provider.dart';

class DateFormatMain extends StatefulWidget {
@override
Expand Down Expand Up @@ -198,7 +196,7 @@ class _DateFormatMainState extends State<DateFormatMain> {
style: Theme.of(context).textTheme.headline6,
),
),
PackageWeblinkView('date_format 2.0.2',
PackageWeblinkView('date_format 2.0.4',
'https://pub.dev/packages/date_format'),
],
)
Expand Down
2 changes: 1 addition & 1 deletion lib/packages/google_fonts/google_fonts_main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class _GoogleFontsMainState extends State<GoogleFontsMain> {
Category.MONOSPACE: 'Monospace'
});
String _url = 'https://pub.dev/packages/google_fonts';
String _googleFontVersion = '2.1.0';
String _googleFontVersion = '2.2.0';

@override
Widget build(BuildContext context) {
Expand Down
2 changes: 1 addition & 1 deletion lib/packages/url_launcher/url_launcher_main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class _UrlLauncherState extends State<UrlLauncher> {
bool _webOnlyWindowName = false;
Map<String, String> _headers = <String, String>{'my_header_key': 'my_header_value'};

String _urlLauncherVersion = 'url_launcher 6.0.6';
String _urlLauncherVersion = 'url_launcher 6.0.17';

@override
Widget build(BuildContext context) {
Expand Down
17 changes: 13 additions & 4 deletions lib/shared/appbar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,25 @@ import 'package:flutter/material.dart';

import 'change_theme_button_widget.dart';

class CustomAppBar extends StatelessWidget implements PreferredSizeWidget{
class CustomAppBar extends StatelessWidget implements PreferredSizeWidget {
final String title;

CustomAppBar({required this.title});

@override
PreferredSizeWidget build(BuildContext context) {
return AppBar(
title: Text(
title,
title: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Image.asset(
'assets/icons/favicon-96x96.png',
fit: BoxFit.contain,
height: 32,
),
Container(
padding: const EdgeInsets.all(8.0), child: Text(title))
],
),
actions: [
ChangeThemeButtonWidget(),
Expand All @@ -21,4 +30,4 @@ class CustomAppBar extends StatelessWidget implements PreferredSizeWidget{

@override
Size get preferredSize => Size.fromHeight(60);
}
}
10 changes: 5 additions & 5 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ dependencies:

# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.2
cupertino_icons: ^1.0.4
email_validator: ^2.0.1
url_launcher: ^6.0.4
url_launcher: ^6.0.17
flutter_signin_button: ^2.0.0
convex_bottom_bar: ^3.0.0
date_format: ^2.0.2
date_format: ^2.0.4
expandable: ^5.0.1
google_fonts: ^6.1.0
provider: ^6.0.5
Expand All @@ -41,8 +41,8 @@ flutter:
uses-material-design: true

# To add assets to your application, add an assets section, like this:
# assets:
# - images/a_dot_burr.jpeg
assets:
- assets/icons/
# - images/a_dot_ham.jpeg

# An image asset can refer to one or more resolution-specific "variants", see
Expand Down
2 changes: 2 additions & 0 deletions web/browserconfig.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig><msapplication><tile><square70x70logo src="icons/ms-icon-70x70.png"/><square150x150logo src="icons/ms-icon-150x150.png"/><square310x310logo src="icons/ms-icon-310x310.png"/><TileColor>#ffffff</TileColor></tile></msapplication></browserconfig>
Binary file added web/favicon.ico
Binary file not shown.
Binary file removed web/favicon.png
Binary file not shown.
Binary file removed web/icons/Icon-192.png
Binary file not shown.
Binary file removed web/icons/Icon-512.png
Diff not rendered.
Binary file added web/icons/android-icon-144x144.png
Binary file added web/icons/android-icon-192x192.png
Binary file added web/icons/android-icon-36x36.png
Binary file added web/icons/android-icon-48x48.png
Binary file added web/icons/android-icon-72x72.png
Binary file added web/icons/android-icon-96x96.png
Binary file added web/icons/apple-icon-114x114.png
Binary file added web/icons/apple-icon-120x120.png
Binary file added web/icons/apple-icon-144x144.png
Binary file added web/icons/apple-icon-152x152.png
Binary file added web/icons/apple-icon-180x180.png
Binary file added web/icons/apple-icon-57x57.png
Binary file added web/icons/apple-icon-60x60.png
Binary file added web/icons/apple-icon-72x72.png
Binary file added web/icons/apple-icon-76x76.png
Binary file added web/icons/apple-icon-precomposed.png
Binary file added web/icons/apple-icon.png
Binary file added web/icons/favicon-16x16.png
Binary file added web/icons/favicon-32x32.png
Binary file added web/icons/favicon-96x96.png
Binary file added web/icons/ms-icon-144x144.png
Binary file added web/icons/ms-icon-150x150.png
Binary file added web/icons/ms-icon-310x310.png
Binary file added web/icons/ms-icon-70x70.png
26 changes: 23 additions & 3 deletions web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
-->
<base href="/">

<title>package_examples</title>

<meta charset="UTF-8">
<meta content="IE=Edge" http-equiv="X-UA-Compatible">
<meta name="description" content="A new Flutter project.">
Expand All @@ -22,10 +24,28 @@
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="package_examples">
<meta name="google-site-verification" content="Mdspa_QIP7YeH6DQ6qgiKUGCTfNkE_gm-NHqQpt-JTY" />
<link rel="apple-touch-icon" href="icons/Icon-192.png">

<title>package_examples</title>
<link rel="manifest" href="manifest.json">
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
<link rel="icon" href="/favicon.ico" type="image/x-icon">

<link rel="apple-touch-icon" sizes="57x57" href="icons/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="icons/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="icons/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="icons/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="icons/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="icons/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="icons/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="icons/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="icons/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="icons/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="icons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="icons/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="icons/favicon-16x16.png">
<link rel="manifest" href="/manifest.json">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">

</head>
<body>
<!-- This script installs service_worker.js to provide PWA functionality to
Expand Down
38 changes: 32 additions & 6 deletions web/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,40 @@
"prefer_related_applications": false,
"icons": [
{
"src": "icons/Icon-192.png",
"sizes": "192x192",
"type": "image/png"
"src": "icons/android-icon-36x36.png",
"sizes": "36x36",
"type": "image\/png",
"density": "0.75"
},
{
"src": "icons/android-icon-48x48.png",
"sizes": "48x48",
"type": "image\/png",
"density": "1.0"
},
{
"src": "icons/android-icon-72x72.png",
"sizes": "72x72",
"type": "image\/png",
"density": "1.5"
},
{
"src": "icons/Icon-512.png",
"sizes": "512x512",
"type": "image/png"
"src": "icons/android-icon-96x96.png",
"sizes": "96x96",
"type": "image\/png",
"density": "2.0"
},
{
"src": "icons/android-icon-144x144.png",
"sizes": "144x144",
"type": "image\/png",
"density": "3.0"
},
{
"src": "icons/android-icon-192x192.png",
"sizes": "192x192",
"type": "image\/png",
"density": "4.0"
}
]
}

0 comments on commit 058d939

Please sign in to comment.