add usefull links

This commit is contained in:
Michael 2025-04-27 20:21:17 +03:00
parent 780e01df45
commit 5ded2aa8d8
4 changed files with 82 additions and 36 deletions

View file

@ -179,7 +179,7 @@ class _AppPageState extends State<AppPage> {
}
class _InfoCard extends StatelessWidget {
const _InfoCard({super.key, required this.topText, required this.bottomText});
const _InfoCard({required this.topText, required this.bottomText});
final String topText;
final String bottomText;

View file

@ -3,6 +3,8 @@ import 'package:openstore/app_page.dart';
import 'package:openstore/search_page.dart';
import 'package:go_router/go_router.dart';
import 'package:dynamic_color/dynamic_color.dart';
import 'package:url_launcher/url_launcher_string.dart';
import 'dart:io' show Platform;
void main() {
runApp(const MyApp());
@ -65,34 +67,80 @@ class HomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text("OpenStore"),
),
body: Center(
child: Row(
children: [
const SizedBox(
width: 15,
),
Flexible(
child: TextField(
onSubmitted: (value) => context.push(
Uri(path: '/search', queryParameters: {'q': value})
.toString()),
textInputAction: TextInputAction.search,
decoration: InputDecoration(
prefixIcon: Icon(Icons.search),
border: OutlineInputBorder()),
),
),
//const SizedBox(width: 5,),
//FilledButton(onPressed: (){}, child: Text("GO")),
const SizedBox(
width: 15,
),
],
appBar: AppBar(
title: const Text("OpenStore"),
),
),
);
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Container(),
Row(
children: [
const SizedBox(
width: 15,
),
Flexible(
child: TextField(
onSubmitted: (value) => context.push(
Uri(path: '/search', queryParameters: {'q': value})
.toString()),
textInputAction: TextInputAction.search,
decoration: const InputDecoration(
prefixIcon: Icon(Icons.search),
border: OutlineInputBorder()),
),
),
//const SizedBox(width: 5,),
//FilledButton(onPressed: (){}, child: Text("GO")),
const SizedBox(
width: 15,
),
],
),
Padding(
padding: const EdgeInsets.fromLTRB(0, 0, 0, 15),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
InkWell(
onTap: () async => await launchUrlString(
"https://git.mi6e4ka.dev/mi6e4ka/openstore"),
child: const Text(
"source code",
style: TextStyle(
decoration: TextDecoration.underline),
),
),
const SizedBox(
width: 8,
),
const Text("|"),
!Platform.isAndroid
? const SizedBox(
width: 8,
)
: Container(),
!Platform.isAndroid
? InkWell(
onTap: () async => await launchUrlString(
"https://git.mi6e4ka.dev/mi6e4ka/openstore/releases"),
child: const Text(
"android app",
style: TextStyle(
decoration: TextDecoration.underline),
),
)
: Container(),
],
),
const Text("v1.2.0")
],
),
)
]),
));
}
}

View file

@ -4,7 +4,6 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:go_router/go_router.dart';
import 'package:http/http.dart' as http;
import 'package:openstore/app_page.dart';
import 'package:openstore/get_app_link.dart';
class SearchPage extends StatefulWidget {
@ -56,9 +55,9 @@ class _SearchPageState extends State<SearchPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text("Поиск")),
appBar: AppBar(title: const Text("Поиск")),
body: _searchResults == null
? LinearProgressIndicator()
? const LinearProgressIndicator()
: ListView.builder(
itemCount: _searchResults?.length,
padding: const EdgeInsets.fromLTRB(15, 0, 15, 0),

View file

@ -2,7 +2,7 @@ name: openstore
description: "A new Flutter project."
# The following line prevents the package from being accidentally published to
# pub.dev using `flutter pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
publish_to: "none" # Remove this line if you wish to publish to pub.dev
# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
@ -16,10 +16,10 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 1.0.0+1
version: 1.2.0+1
environment:
sdk: '>=3.4.3 <4.0.0'
sdk: ">=3.4.3 <4.0.0"
# Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions
@ -55,7 +55,6 @@ dev_dependencies:
# The following section is specific to Flutter packages.
flutter:
# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.