Merge branch 'main' into feature/ML-42

This commit is contained in:
Vadim 2023-03-21 00:05:34 +03:00 committed by GitHub
commit 2d7e5f56ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
33 changed files with 104 additions and 37 deletions

View file

@ -5,7 +5,7 @@
<application
android:label="Lightmeter"
android:name="${applicationName}"
android:icon="@mipmap/launcher_icon">
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
android:exported="true"

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

View file

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>

View file

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>

View file

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 544 B

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 442 B

After

Width:  |  Height:  |  Size: 784 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 721 B

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#212121</color>
</resources>

View file

@ -29,7 +29,9 @@ class _PrimaryColorDialogPickerState extends State<PrimaryColorDialogPicker> {
content: SizedBox(
height: Dimens.grid48,
width: double.maxFinite,
child: SingleChildScrollView(
child: Stack(
children: [
SingleChildScrollView(
controller: _scrollController,
scrollDirection: Axis.horizontal,
padding: EdgeInsets.zero,
@ -54,7 +56,18 @@ class _PrimaryColorDialogPickerState extends State<PrimaryColorDialogPicker> {
),
),
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: const [
_Cutout(),
RotatedBox(
quarterTurns: 2,
child: _Cutout(),
),
],
),
],
)),
actionsPadding: Dimens.dialogActionsPadding,
actions: [
TextButton(
@ -120,3 +133,47 @@ class _SelectableColorItemState extends State<_SelectableColorItem> {
);
}
}
class _Cutout extends StatelessWidget {
const _Cutout();
@override
Widget build(BuildContext context) {
return SizedBox(
height: Dimens.grid48,
width: Dimens.grid24,
child: ClipPath(
clipper: const _CutoutClipper(),
child: Material(
color: Theme.of(context).dialogTheme.backgroundColor,
surfaceTintColor: Theme.of(context).colorScheme.surfaceTint,
elevation: Theme.of(context).dialogTheme.elevation!,
shadowColor: Colors.transparent,
),
),
);
}
}
class _CutoutClipper extends CustomClipper<Path> {
const _CutoutClipper();
@override
Path getClip(Size size) {
final path = Path();
final radius = size.height / 2;
path.lineTo(radius, 0);
path.arcToPoint(
Offset(radius, size.height),
radius: Radius.circular(radius),
rotation: 180,
clockwise: false,
);
path.lineTo(0, size.height);
path.close();
return path;
}
@override
bool shouldReclip(CustomClipper oldClipper) => false;
}

View file

@ -1,7 +1,7 @@
name: lightmeter
description: A new Flutter project.
publish_to: "none"
version: 0.8.2+14
version: 0.8.3+15
environment:
sdk: ">=2.18.0 <3.0.0"
@ -48,14 +48,5 @@ dependency_overrides:
flutter:
uses-material-design: true
flutter_icons:
image_path_android: "assets/launcher_icon_circle.png"
android: "launcher_icon"
adaptive_icon_background: "#fafafa"
image_path_ios: "assets/launcher_icon_square.png"
ios: true
remove_alpha_ios: true
min_sdk_android: 21
flutter_intl:
enabled: true