upgraded Flutter to stable v3.3.1
This commit is contained in:
parent
306bae09ea
commit
d79b34910b
13 changed files with 112 additions and 276 deletions
2
.github/workflows/check.yml
vendored
2
.github/workflows/check.yml
vendored
|
@ -17,7 +17,7 @@ jobs:
|
||||||
# Available versions may lag behind https://github.com/flutter/flutter.git
|
# Available versions may lag behind https://github.com/flutter/flutter.git
|
||||||
- uses: subosito/flutter-action@v2
|
- uses: subosito/flutter-action@v2
|
||||||
with:
|
with:
|
||||||
flutter-version: '3.3.0'
|
flutter-version: '3.3.1'
|
||||||
channel: 'stable'
|
channel: 'stable'
|
||||||
|
|
||||||
- name: Clone the repository.
|
- name: Clone the repository.
|
||||||
|
|
10
.github/workflows/release.yml
vendored
10
.github/workflows/release.yml
vendored
|
@ -19,7 +19,7 @@ jobs:
|
||||||
# Available versions may lag behind https://github.com/flutter/flutter.git
|
# Available versions may lag behind https://github.com/flutter/flutter.git
|
||||||
- uses: subosito/flutter-action@v2
|
- uses: subosito/flutter-action@v2
|
||||||
with:
|
with:
|
||||||
flutter-version: '3.3.0'
|
flutter-version: '3.3.1'
|
||||||
channel: 'stable'
|
channel: 'stable'
|
||||||
|
|
||||||
# Workaround for this Android Gradle Plugin issue (supposedly fixed in AGP 4.1):
|
# Workaround for this Android Gradle Plugin issue (supposedly fixed in AGP 4.1):
|
||||||
|
@ -56,15 +56,15 @@ jobs:
|
||||||
rm release.keystore.asc
|
rm release.keystore.asc
|
||||||
mkdir outputs
|
mkdir outputs
|
||||||
(cd scripts/; ./apply_flavor_play.sh)
|
(cd scripts/; ./apply_flavor_play.sh)
|
||||||
flutter build appbundle -t lib/main_play.dart --flavor play --bundle-sksl-path shaders_3.3.0.sksl.json
|
flutter build appbundle -t lib/main_play.dart --flavor play --bundle-sksl-path shaders_3.3.1.sksl.json
|
||||||
cp build/app/outputs/bundle/playRelease/*.aab outputs
|
cp build/app/outputs/bundle/playRelease/*.aab outputs
|
||||||
flutter build apk -t lib/main_play.dart --flavor play --bundle-sksl-path shaders_3.3.0.sksl.json
|
flutter build apk -t lib/main_play.dart --flavor play --bundle-sksl-path shaders_3.3.1.sksl.json
|
||||||
cp build/app/outputs/apk/play/release/*.apk outputs
|
cp build/app/outputs/apk/play/release/*.apk outputs
|
||||||
(cd scripts/; ./apply_flavor_huawei.sh)
|
(cd scripts/; ./apply_flavor_huawei.sh)
|
||||||
flutter build apk -t lib/main_huawei.dart --flavor huawei --bundle-sksl-path shaders_3.3.0.sksl.json
|
flutter build apk -t lib/main_huawei.dart --flavor huawei --bundle-sksl-path shaders_3.3.1.sksl.json
|
||||||
cp build/app/outputs/apk/huawei/release/*.apk outputs
|
cp build/app/outputs/apk/huawei/release/*.apk outputs
|
||||||
(cd scripts/; ./apply_flavor_izzy.sh)
|
(cd scripts/; ./apply_flavor_izzy.sh)
|
||||||
flutter build apk -t lib/main_izzy.dart --flavor izzy --split-per-abi --bundle-sksl-path shaders_3.3.0.sksl.json
|
flutter build apk -t lib/main_izzy.dart --flavor izzy --split-per-abi --bundle-sksl-path shaders_3.3.1.sksl.json
|
||||||
cp build/app/outputs/apk/izzy/release/*.apk outputs
|
cp build/app/outputs/apk/izzy/release/*.apk outputs
|
||||||
rm $AVES_STORE_FILE
|
rm $AVES_STORE_FILE
|
||||||
env:
|
env:
|
||||||
|
|
|
@ -14,7 +14,7 @@ All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
- upgraded Flutter to stable v3.3.0
|
- upgraded Flutter to stable v3.3.1
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
|
|
@ -154,7 +154,7 @@ repositories {
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2'
|
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2'
|
||||||
implementation 'androidx.core:core-ktx:1.8.0'
|
implementation 'androidx.core:core-ktx:1.9.0'
|
||||||
implementation 'androidx.exifinterface:exifinterface:1.3.3'
|
implementation 'androidx.exifinterface:exifinterface:1.3.3'
|
||||||
implementation 'androidx.multidex:multidex:2.0.1'
|
implementation 'androidx.multidex:multidex:2.0.1'
|
||||||
implementation 'com.caverock:androidsvg-aar:1.4'
|
implementation 'com.caverock:androidsvg-aar:1.4'
|
||||||
|
|
|
@ -155,7 +155,6 @@ class _EntryLeafletMapState<T> extends State<EntryLeafletMap<T>> with TickerProv
|
||||||
// prevent triggering multiple gestures at once (e.g. rotating a bit when mostly zooming)
|
// prevent triggering multiple gestures at once (e.g. rotating a bit when mostly zooming)
|
||||||
enableMultiFingerGestureRace: true,
|
enableMultiFingerGestureRace: true,
|
||||||
onTap: (tapPosition, point) => widget.onMapTap?.call(point),
|
onTap: (tapPosition, point) => widget.onMapTap?.call(point),
|
||||||
controller: _leafletMapController,
|
|
||||||
),
|
),
|
||||||
mapController: _leafletMapController,
|
mapController: _leafletMapController,
|
||||||
nonRotatedChildren: [
|
nonRotatedChildren: [
|
||||||
|
@ -168,27 +167,23 @@ class _EntryLeafletMapState<T> extends State<EntryLeafletMap<T>> with TickerProv
|
||||||
children: [
|
children: [
|
||||||
_buildMapLayer(),
|
_buildMapLayer(),
|
||||||
if (widget.overlayEntry != null) _buildOverlayImageLayer(),
|
if (widget.overlayEntry != null) _buildOverlayImageLayer(),
|
||||||
MarkerLayerWidget(
|
MarkerLayer(
|
||||||
options: MarkerLayerOptions(
|
markers: markers,
|
||||||
markers: markers,
|
rotate: true,
|
||||||
rotate: true,
|
rotateAlignment: Alignment.bottomCenter,
|
||||||
rotateAlignment: Alignment.bottomCenter,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
ValueListenableBuilder<LatLng?>(
|
ValueListenableBuilder<LatLng?>(
|
||||||
valueListenable: widget.dotLocationNotifier ?? ValueNotifier(null),
|
valueListenable: widget.dotLocationNotifier ?? ValueNotifier(null),
|
||||||
builder: (context, dotLocation, child) => MarkerLayerWidget(
|
builder: (context, dotLocation, child) => MarkerLayer(
|
||||||
options: MarkerLayerOptions(
|
markers: [
|
||||||
markers: [
|
if (dotLocation != null)
|
||||||
if (dotLocation != null)
|
Marker(
|
||||||
Marker(
|
point: dotLocation,
|
||||||
point: dotLocation,
|
builder: (context) => const DotMarker(),
|
||||||
builder: (context) => const DotMarker(),
|
width: dotMarkerSize.width,
|
||||||
width: dotMarkerSize.width,
|
height: dotMarkerSize.height,
|
||||||
height: dotMarkerSize.height,
|
)
|
||||||
)
|
],
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -219,16 +214,14 @@ class _EntryLeafletMapState<T> extends State<EntryLeafletMap<T>> with TickerProv
|
||||||
return ValueListenableBuilder<double>(
|
return ValueListenableBuilder<double>(
|
||||||
valueListenable: widget.overlayOpacityNotifier ?? ValueNotifier(1),
|
valueListenable: widget.overlayOpacityNotifier ?? ValueNotifier(1),
|
||||||
builder: (context, overlayOpacity, child) {
|
builder: (context, overlayOpacity, child) {
|
||||||
return OverlayImageLayerWidget(
|
return OverlayImageLayer(
|
||||||
options: OverlayImageLayerOptions(
|
overlayImages: [
|
||||||
overlayImages: [
|
OverlayImage(
|
||||||
OverlayImage(
|
bounds: LatLngBounds(corner1, corner2),
|
||||||
bounds: LatLngBounds(corner1, corner2),
|
imageProvider: overlayEntry.imageProvider,
|
||||||
imageProvider: overlayEntry.imageProvider,
|
opacity: overlayOpacity,
|
||||||
opacity: overlayOpacity,
|
),
|
||||||
),
|
],
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
|
import 'dart:math';
|
||||||
|
|
||||||
import 'package:aves/model/settings/enums/enums.dart';
|
import 'package:aves/model/settings/enums/enums.dart';
|
||||||
import 'package:aves/widgets/common/basic/outlined_text.dart';
|
import 'package:aves/widgets/common/basic/outlined_text.dart';
|
||||||
import 'package:aves/widgets/common/map/leaflet/scalebar_utils.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_map/plugin_api.dart';
|
import 'package:flutter_map/plugin_api.dart';
|
||||||
|
import 'package:latlong2/latlong.dart';
|
||||||
|
|
||||||
class ScaleLayerOptions extends LayerOptions {
|
class ScaleLayerOptions {
|
||||||
final UnitSystem unitSystem;
|
final UnitSystem unitSystem;
|
||||||
final Widget Function(double width, String distance) builder;
|
final Widget Function(double width, String distance) builder;
|
||||||
|
|
||||||
ScaleLayerOptions({
|
ScaleLayerOptions({
|
||||||
super.key,
|
|
||||||
this.unitSystem = UnitSystem.metric,
|
this.unitSystem = UnitSystem.metric,
|
||||||
this.builder = defaultBuilder,
|
this.builder = defaultBuilder,
|
||||||
rebuild,
|
});
|
||||||
}) : super(rebuild: rebuild);
|
|
||||||
|
|
||||||
static Widget defaultBuilder(double width, String distance) {
|
static Widget defaultBuilder(double width, String distance) {
|
||||||
return ScaleBar(
|
return ScaleBar(
|
||||||
|
@ -26,20 +26,13 @@ class ScaleLayerOptions extends LayerOptions {
|
||||||
class ScaleLayerWidget extends StatelessWidget {
|
class ScaleLayerWidget extends StatelessWidget {
|
||||||
final ScaleLayerOptions options;
|
final ScaleLayerOptions options;
|
||||||
|
|
||||||
ScaleLayerWidget({required this.options}) : super(key: options.key);
|
final Distance _distanceCalculator = const Distance();
|
||||||
|
|
||||||
@override
|
const ScaleLayerWidget({
|
||||||
Widget build(BuildContext context) {
|
super.key,
|
||||||
final mapState = MapState.maybeOf(context);
|
required this.options,
|
||||||
return mapState != null ? ScaleLayer(options, mapState, mapState.onMoved) : const SizedBox();
|
});
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class ScaleLayer extends StatelessWidget {
|
|
||||||
final ScaleLayerOptions scaleLayerOpts;
|
|
||||||
final MapState map;
|
|
||||||
|
|
||||||
final Stream<void> stream;
|
|
||||||
static const List<double> scaleMeters = [
|
static const List<double> scaleMeters = [
|
||||||
25000000,
|
25000000,
|
||||||
15000000,
|
15000000,
|
||||||
|
@ -70,53 +63,47 @@ class ScaleLayer extends StatelessWidget {
|
||||||
static const double metersInAMile = 1609.344;
|
static const double metersInAMile = 1609.344;
|
||||||
static const double metersInAFoot = 0.3048;
|
static const double metersInAFoot = 0.3048;
|
||||||
|
|
||||||
ScaleLayer(this.scaleLayerOpts, this.map, this.stream) : super(key: scaleLayerOpts.key);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return StreamBuilder<void>(
|
final map = FlutterMapState.maybeOf(context)!;
|
||||||
stream: stream,
|
final center = map.center;
|
||||||
builder: (context, snapshot) {
|
final latitude = center.latitude.abs();
|
||||||
final center = map.center;
|
final level = map.zoom.round() +
|
||||||
final latitude = center.latitude.abs();
|
(latitude > 80
|
||||||
final level = map.zoom.round() +
|
? 4
|
||||||
(latitude > 80
|
: latitude > 60
|
||||||
? 4
|
? 3
|
||||||
: latitude > 60
|
: 2);
|
||||||
? 3
|
final scaleLevel = level.clamp(0, 20);
|
||||||
: 2);
|
late final double distanceMeters;
|
||||||
final scaleLevel = level.clamp(0, 20);
|
late final String displayDistance;
|
||||||
late final double distanceMeters;
|
switch (options.unitSystem) {
|
||||||
late final String displayDistance;
|
case UnitSystem.metric:
|
||||||
switch (scaleLayerOpts.unitSystem) {
|
// meters
|
||||||
case UnitSystem.metric:
|
distanceMeters = scaleMeters[scaleLevel];
|
||||||
// meters
|
displayDistance = distanceMeters >= metersInAKilometer ? '${(distanceMeters / metersInAKilometer).toStringAsFixed(0)} km' : '${distanceMeters.toStringAsFixed(0)} m';
|
||||||
distanceMeters = scaleMeters[scaleLevel];
|
break;
|
||||||
displayDistance = distanceMeters >= metersInAKilometer ? '${(distanceMeters / metersInAKilometer).toStringAsFixed(0)} km' : '${distanceMeters.toStringAsFixed(0)} m';
|
case UnitSystem.imperial:
|
||||||
break;
|
if (scaleLevel < 15) {
|
||||||
case UnitSystem.imperial:
|
// miles
|
||||||
if (scaleLevel < 15) {
|
final distanceMiles = scaleMeters[scaleLevel + 1] / 1000;
|
||||||
// miles
|
distanceMeters = distanceMiles * metersInAMile;
|
||||||
final distanceMiles = scaleMeters[scaleLevel + 1] / 1000;
|
displayDistance = '${distanceMiles.toStringAsFixed(0)} mi';
|
||||||
distanceMeters = distanceMiles * metersInAMile;
|
} else {
|
||||||
displayDistance = '${distanceMiles.toStringAsFixed(0)} mi';
|
// feet
|
||||||
} else {
|
final distanceFeet = scaleMeters[scaleLevel - 1];
|
||||||
// feet
|
distanceMeters = distanceFeet * metersInAFoot;
|
||||||
final distanceFeet = scaleMeters[scaleLevel - 1];
|
displayDistance = '${distanceFeet.toStringAsFixed(0)} ft';
|
||||||
distanceMeters = distanceFeet * metersInAFoot;
|
|
||||||
displayDistance = '${distanceFeet.toStringAsFixed(0)} ft';
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
final start = map.project(center);
|
final start = map.project(center);
|
||||||
final targetPoint = ScaleBarUtils.calculateEndingGlobalCoordinates(center, 90, distanceMeters);
|
final targetPoint = _distanceCalculator.offset(center, distanceMeters, 90);
|
||||||
final end = map.project(targetPoint);
|
final end = map.project(targetPoint);
|
||||||
final width = end.x - (start.x as double);
|
final width = max(0, end.x - start.x).toDouble();
|
||||||
|
|
||||||
return scaleLayerOpts.builder(width, displayDistance);
|
return options.builder(width, displayDistance);
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,118 +0,0 @@
|
||||||
import 'dart:math';
|
|
||||||
|
|
||||||
import 'package:latlong2/latlong.dart';
|
|
||||||
|
|
||||||
class ScaleBarUtils {
|
|
||||||
static LatLng calculateEndingGlobalCoordinates(LatLng start, double startBearing, double distanceMeters) {
|
|
||||||
var mSemiMajorAxis = 6378137.0; //WGS84 major axis
|
|
||||||
var mSemiMinorAxis = (1.0 - 1.0 / 298.257223563) * 6378137.0;
|
|
||||||
var mFlattening = 1.0 / 298.257223563;
|
|
||||||
// double mInverseFlattening = 298.257223563;
|
|
||||||
|
|
||||||
var a = mSemiMajorAxis;
|
|
||||||
var b = mSemiMinorAxis;
|
|
||||||
var aSquared = a * a;
|
|
||||||
var bSquared = b * b;
|
|
||||||
var f = mFlattening;
|
|
||||||
var phi1 = degToRadian(start.latitude);
|
|
||||||
var alpha1 = degToRadian(startBearing);
|
|
||||||
var cosAlpha1 = cos(alpha1);
|
|
||||||
var sinAlpha1 = sin(alpha1);
|
|
||||||
var s = distanceMeters;
|
|
||||||
var tanU1 = (1.0 - f) * tan(phi1);
|
|
||||||
var cosU1 = 1.0 / sqrt(1.0 + tanU1 * tanU1);
|
|
||||||
var sinU1 = tanU1 * cosU1;
|
|
||||||
|
|
||||||
// eq. 1
|
|
||||||
var sigma1 = atan2(tanU1, cosAlpha1);
|
|
||||||
|
|
||||||
// eq. 2
|
|
||||||
var sinAlpha = cosU1 * sinAlpha1;
|
|
||||||
|
|
||||||
var sin2Alpha = sinAlpha * sinAlpha;
|
|
||||||
var cos2Alpha = 1 - sin2Alpha;
|
|
||||||
var uSquared = cos2Alpha * (aSquared - bSquared) / bSquared;
|
|
||||||
|
|
||||||
// eq. 3
|
|
||||||
var A = 1 + (uSquared / 16384) * (4096 + uSquared * (-768 + uSquared * (320 - 175 * uSquared)));
|
|
||||||
|
|
||||||
// eq. 4
|
|
||||||
var B = (uSquared / 1024) * (256 + uSquared * (-128 + uSquared * (74 - 47 * uSquared)));
|
|
||||||
|
|
||||||
// iterate until there is a negligible change in sigma
|
|
||||||
double deltaSigma;
|
|
||||||
var sOverbA = s / (b * A);
|
|
||||||
var sigma = sOverbA;
|
|
||||||
double sinSigma;
|
|
||||||
var prevSigma = sOverbA;
|
|
||||||
double sigmaM2;
|
|
||||||
double cosSigmaM2;
|
|
||||||
double cos2SigmaM2;
|
|
||||||
|
|
||||||
for (;;) {
|
|
||||||
// eq. 5
|
|
||||||
sigmaM2 = 2.0 * sigma1 + sigma;
|
|
||||||
cosSigmaM2 = cos(sigmaM2);
|
|
||||||
cos2SigmaM2 = cosSigmaM2 * cosSigmaM2;
|
|
||||||
sinSigma = sin(sigma);
|
|
||||||
var cosSignma = cos(sigma);
|
|
||||||
|
|
||||||
// eq. 6
|
|
||||||
deltaSigma = B * sinSigma * (cosSigmaM2 + (B / 4.0) * (cosSignma * (-1 + 2 * cos2SigmaM2) - (B / 6.0) * cosSigmaM2 * (-3 + 4 * sinSigma * sinSigma) * (-3 + 4 * cos2SigmaM2)));
|
|
||||||
|
|
||||||
// eq. 7
|
|
||||||
sigma = sOverbA + deltaSigma;
|
|
||||||
|
|
||||||
// break after converging to tolerance
|
|
||||||
if ((sigma - prevSigma).abs() < 0.0000000000001) break;
|
|
||||||
|
|
||||||
prevSigma = sigma;
|
|
||||||
}
|
|
||||||
|
|
||||||
sigmaM2 = 2.0 * sigma1 + sigma;
|
|
||||||
cosSigmaM2 = cos(sigmaM2);
|
|
||||||
cos2SigmaM2 = cosSigmaM2 * cosSigmaM2;
|
|
||||||
|
|
||||||
var cosSigma = cos(sigma);
|
|
||||||
sinSigma = sin(sigma);
|
|
||||||
|
|
||||||
// eq. 8
|
|
||||||
var phi2 = atan2(sinU1 * cosSigma + cosU1 * sinSigma * cosAlpha1, (1.0 - f) * sqrt(sin2Alpha + pow(sinU1 * sinSigma - cosU1 * cosSigma * cosAlpha1, 2.0)));
|
|
||||||
|
|
||||||
// eq. 9
|
|
||||||
// This fixes the pole crossing defect spotted by Matt Feemster. When a
|
|
||||||
// path passes a pole and essentially crosses a line of latitude twice -
|
|
||||||
// once in each direction - the longitude calculation got messed up.
|
|
||||||
// Using
|
|
||||||
// atan2 instead of atan fixes the defect. The change is in the next 3
|
|
||||||
// lines.
|
|
||||||
// double tanLambda = sinSigma * sinAlpha1 / (cosU1 * cosSigma - sinU1 *
|
|
||||||
// sinSigma * cosAlpha1);
|
|
||||||
// double lambda = Math.atan(tanLambda);
|
|
||||||
var lambda = atan2(sinSigma * sinAlpha1, (cosU1 * cosSigma - sinU1 * sinSigma * cosAlpha1));
|
|
||||||
|
|
||||||
// eq. 10
|
|
||||||
var C = (f / 16) * cos2Alpha * (4 + f * (4 - 3 * cos2Alpha));
|
|
||||||
|
|
||||||
// eq. 11
|
|
||||||
var L = lambda - (1 - C) * f * sinAlpha * (sigma + C * sinSigma * (cosSigmaM2 + C * cosSigma * (-1 + 2 * cos2SigmaM2)));
|
|
||||||
|
|
||||||
// eq. 12
|
|
||||||
// double alpha2 = Math.atan2(sinAlpha, -sinU1 * sinSigma + cosU1 *
|
|
||||||
// cosSigma * cosAlpha1);
|
|
||||||
|
|
||||||
// build result
|
|
||||||
var latitude = radianToDeg(phi2);
|
|
||||||
var longitude = start.longitude + radianToDeg(L);
|
|
||||||
|
|
||||||
// if ((endBearing != null) && (endBearing.length > 0)) {
|
|
||||||
// endBearing[0] = toDegrees(alpha2);
|
|
||||||
// }
|
|
||||||
|
|
||||||
latitude = latitude < -90 ? -90 : latitude;
|
|
||||||
latitude = latitude > 90 ? 90 : latitude;
|
|
||||||
longitude = longitude < -180 ? -180 : longitude;
|
|
||||||
longitude = longitude > 180 ? 180 : longitude;
|
|
||||||
return LatLng(latitude, longitude);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -10,14 +10,12 @@ class OSMHotLayer extends StatelessWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return TileLayerWidget(
|
return TileLayer(
|
||||||
options: TileLayerOptions(
|
urlTemplate: 'https://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png',
|
||||||
urlTemplate: 'https://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png',
|
subdomains: const ['a', 'b', 'c'],
|
||||||
subdomains: ['a', 'b', 'c'],
|
backgroundColor: _tileLayerBackgroundColor,
|
||||||
backgroundColor: _tileLayerBackgroundColor,
|
retinaMode: context.select<MediaQueryData, double>((mq) => mq.devicePixelRatio) > 1,
|
||||||
retinaMode: context.select<MediaQueryData, double>((mq) => mq.devicePixelRatio) > 1,
|
userAgentPackageName: device.userAgent,
|
||||||
userAgentPackageName: device.userAgent,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,14 +25,12 @@ class StamenTonerLayer extends StatelessWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return TileLayerWidget(
|
return TileLayer(
|
||||||
options: TileLayerOptions(
|
urlTemplate: 'https://stamen-tiles-{s}.a.ssl.fastly.net/toner-lite/{z}/{x}/{y}{r}.png',
|
||||||
urlTemplate: 'https://stamen-tiles-{s}.a.ssl.fastly.net/toner-lite/{z}/{x}/{y}{r}.png',
|
subdomains: const ['a', 'b', 'c', 'd'],
|
||||||
subdomains: ['a', 'b', 'c', 'd'],
|
backgroundColor: _tileLayerBackgroundColor,
|
||||||
backgroundColor: _tileLayerBackgroundColor,
|
retinaMode: context.select<MediaQueryData, double>((mq) => mq.devicePixelRatio) > 1,
|
||||||
retinaMode: context.select<MediaQueryData, double>((mq) => mq.devicePixelRatio) > 1,
|
userAgentPackageName: device.userAgent,
|
||||||
userAgentPackageName: device.userAgent,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -44,14 +40,12 @@ class StamenWatercolorLayer extends StatelessWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return TileLayerWidget(
|
return TileLayer(
|
||||||
options: TileLayerOptions(
|
urlTemplate: 'https://stamen-tiles-{s}.a.ssl.fastly.net/watercolor/{z}/{x}/{y}.jpg',
|
||||||
urlTemplate: 'https://stamen-tiles-{s}.a.ssl.fastly.net/watercolor/{z}/{x}/{y}.jpg',
|
subdomains: const ['a', 'b', 'c', 'd'],
|
||||||
subdomains: ['a', 'b', 'c', 'd'],
|
backgroundColor: _tileLayerBackgroundColor,
|
||||||
backgroundColor: _tileLayerBackgroundColor,
|
retinaMode: context.select<MediaQueryData, double>((mq) => mq.devicePixelRatio) > 1,
|
||||||
retinaMode: context.select<MediaQueryData, double>((mq) => mq.devicePixelRatio) > 1,
|
userAgentPackageName: device.userAgent,
|
||||||
userAgentPackageName: device.userAgent,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
28
pubspec.lock
28
pubspec.lock
|
@ -259,7 +259,7 @@ packages:
|
||||||
name: device_info_plus_windows
|
name: device_info_plus_windows
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.0.0"
|
version: "4.1.0"
|
||||||
dynamic_color:
|
dynamic_color:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
@ -326,7 +326,7 @@ packages:
|
||||||
name: firebase_core
|
name: firebase_core
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.21.1"
|
version: "1.22.0"
|
||||||
firebase_core_platform_interface:
|
firebase_core_platform_interface:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -347,28 +347,28 @@ packages:
|
||||||
name: firebase_crashlytics
|
name: firebase_crashlytics
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.8.9"
|
version: "2.8.10"
|
||||||
firebase_crashlytics_platform_interface:
|
firebase_crashlytics_platform_interface:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: firebase_crashlytics_platform_interface
|
name: firebase_crashlytics_platform_interface
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.2.15"
|
version: "3.2.16"
|
||||||
flex_color_picker:
|
flex_color_picker:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: flex_color_picker
|
name: flex_color_picker
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.6.0"
|
version: "2.6.1"
|
||||||
flex_seed_scheme:
|
flex_seed_scheme:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: flex_seed_scheme
|
name: flex_seed_scheme
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.0"
|
version: "1.0.1"
|
||||||
fluster:
|
fluster:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
@ -425,7 +425,7 @@ packages:
|
||||||
name: flutter_map
|
name: flutter_map
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.2.0"
|
version: "3.0.0"
|
||||||
flutter_markdown:
|
flutter_markdown:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
@ -734,7 +734,7 @@ packages:
|
||||||
name: package_info_plus_windows
|
name: package_info_plus_windows
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.0"
|
version: "2.1.0"
|
||||||
palette_generator:
|
palette_generator:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
@ -785,7 +785,7 @@ packages:
|
||||||
name: path_provider_windows
|
name: path_provider_windows
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.2"
|
version: "2.1.3"
|
||||||
pdf:
|
pdf:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
@ -885,7 +885,7 @@ packages:
|
||||||
name: printing
|
name: printing
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "5.9.2"
|
version: "5.9.3"
|
||||||
process:
|
process:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -976,7 +976,7 @@ packages:
|
||||||
name: shared_preferences_android
|
name: shared_preferences_android
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.12"
|
version: "2.0.13"
|
||||||
shared_preferences_ios:
|
shared_preferences_ios:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -1137,7 +1137,7 @@ packages:
|
||||||
name: synchronized
|
name: synchronized
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.0+2"
|
version: "3.0.0+3"
|
||||||
term_glyph:
|
term_glyph:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -1207,7 +1207,7 @@ packages:
|
||||||
name: url_launcher_android
|
name: url_launcher_android
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "6.0.17"
|
version: "6.0.18"
|
||||||
url_launcher_ios:
|
url_launcher_ios:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -1298,7 +1298,7 @@ packages:
|
||||||
name: win32
|
name: win32
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.7.0"
|
version: "3.0.0"
|
||||||
wkt_parser:
|
wkt_parser:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
File diff suppressed because one or more lines are too long
1
shaders_3.3.1.sksl.json
Normal file
1
shaders_3.3.1.sksl.json
Normal file
File diff suppressed because one or more lines are too long
|
@ -4,6 +4,7 @@ import 'package:aves/main_play.dart' as app;
|
||||||
import 'package:aves/model/settings/defaults.dart';
|
import 'package:aves/model/settings/defaults.dart';
|
||||||
import 'package:aves/model/settings/enums/enums.dart';
|
import 'package:aves/model/settings/enums/enums.dart';
|
||||||
import 'package:aves/model/settings/settings.dart';
|
import 'package:aves/model/settings/settings.dart';
|
||||||
|
import 'package:aves/model/source/enums/enums.dart';
|
||||||
import 'package:aves_map/src/style.dart';
|
import 'package:aves_map/src/style.dart';
|
||||||
import 'package:flutter_driver/driver_extension.dart';
|
import 'package:flutter_driver/driver_extension.dart';
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
|
@ -29,6 +30,8 @@ Future<void> configureAndLaunch() async {
|
||||||
..homePage = HomePageSetting.collection
|
..homePage = HomePageSetting.collection
|
||||||
..enableBottomNavigationBar = true
|
..enableBottomNavigationBar = true
|
||||||
// collection
|
// collection
|
||||||
|
..collectionSectionFactor = EntryGroupFactor.album
|
||||||
|
..collectionSortFactor = EntrySortFactor.date
|
||||||
..collectionBrowsingQuickActions = SettingsDefaults.collectionBrowsingQuickActions
|
..collectionBrowsingQuickActions = SettingsDefaults.collectionBrowsingQuickActions
|
||||||
// viewer
|
// viewer
|
||||||
..showOverlayOnOpening = true
|
..showOverlayOnOpening = true
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
// ignore_for_file: avoid_print
|
// ignore_for_file: avoid_print
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
|
||||||
import 'package:aves/model/source/enums/enums.dart';
|
|
||||||
import 'package:flutter_driver/flutter_driver.dart';
|
import 'package:flutter_driver/flutter_driver.dart';
|
||||||
import 'package:path/path.dart' as p;
|
import 'package:path/path.dart' as p;
|
||||||
import 'package:test/test.dart';
|
import 'package:test/test.dart';
|
||||||
|
@ -37,8 +36,6 @@ void main() {
|
||||||
test('scan media dir', () => driver.scanMediaDir(shadersTargetDirAndroid));
|
test('scan media dir', () => driver.scanMediaDir(shadersTargetDirAndroid));
|
||||||
visitAbout();
|
visitAbout();
|
||||||
visitSettings();
|
visitSettings();
|
||||||
sortCollection();
|
|
||||||
groupCollection();
|
|
||||||
visitMap();
|
visitMap();
|
||||||
selectFirstAlbum();
|
selectFirstAlbum();
|
||||||
searchAlbum();
|
searchAlbum();
|
||||||
|
@ -93,26 +90,6 @@ void visitSettings() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void sortCollection() {
|
|
||||||
test('[collection] sort', () async {
|
|
||||||
await driver.tapKeyAndWait('appbar-menu-button');
|
|
||||||
await driver.tapKeyAndWait('menu-configureView');
|
|
||||||
await driver.tapKeyAndWait('tab-sort');
|
|
||||||
await driver.tapKeyAndWait(EntrySortFactor.date.toString());
|
|
||||||
await driver.tapKeyAndWait('button-apply');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
void groupCollection() {
|
|
||||||
test('[collection] group', () async {
|
|
||||||
await driver.tapKeyAndWait('appbar-menu-button');
|
|
||||||
await driver.tapKeyAndWait('menu-configureView');
|
|
||||||
await driver.tapKeyAndWait('tab-group');
|
|
||||||
await driver.tapKeyAndWait(EntryGroupFactor.album.toString());
|
|
||||||
await driver.tapKeyAndWait('button-apply');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
void visitMap() {
|
void visitMap() {
|
||||||
test('[collection] visit map', () async {
|
test('[collection] visit map', () async {
|
||||||
await driver.tapKeyAndWait('appbar-menu-button');
|
await driver.tapKeyAndWait('appbar-menu-button');
|
||||||
|
|
Loading…
Reference in a new issue