changed logo, removed flutter_svg

This commit is contained in:
Thibault Deckers 2021-07-02 16:48:44 +09:00
parent e965b2e2ee
commit 3208208af1
21 changed files with 178 additions and 128 deletions

View file

@ -0,0 +1,30 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:pathData="m28.197,37.308 l32.616,32.616a1.388,1.388 0.001,0 0,1.962 0l6.079,-6.078a3.892,3.892 90.001,0 0,0 -5.504L45.475,34.962A4.737,4.737 22.5,0 0,42.125 33.575H29.744a2.187,2.187 112.5,0 0,-1.546 3.733z"
android:strokeLineJoin="round"
android:strokeWidth="1.34474"
android:fillColor="#7B1FA2"
android:strokeColor="#000000"/>
<path
android:pathData="m46.789,65.896v16.476a1.466,1.466 22.5,0 0,2.502 1.036l7.505,-7.505a3.538,3.538 90,0 0,0 -5.004L50.327,64.431a2.073,2.073 157.5,0 0,-3.538 1.466z"
android:strokeLineJoin="round"
android:strokeWidth="1.34474"
android:fillColor="#4caf50"
android:strokeColor="#000000"/>
<path
android:pathData="M71.606,51.09V34.614a1.465,1.465 22.5,0 0,-2.502 -1.036l-7.505,7.505a3.538,3.538 90,0 0,0 5.004l6.469,6.469a2.073,2.073 157.5,0 0,3.538 -1.465z"
android:strokeLineJoin="round"
android:strokeWidth="1.34474"
android:fillColor="#ffc107"
android:strokeColor="#000000"/>
<path
android:pathData="m81.328,37.785 l-4.315,-4.315a1.099,1.099 157.5,0 0,-1.876 0.777v3.538a2.654,2.654 45,0 0,2.654 2.654h2.439a1.554,1.554 112.5,0 0,1.099 -2.654z"
android:strokeLineJoin="round"
android:strokeWidth="1.34474"
android:fillColor="#ff5722"
android:strokeColor="#000000"/>
</vector>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

View file

@ -1,29 +1,30 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="543.4783"
android:viewportHeight="543.4783">
<group android:translateX="21.73913"
android:translateY="21.73913">
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:pathData="M117.223,148.664 L283.784,315.225 327.561,271.45 204.776,148.664Z"
android:strokeWidth="1.91993546"
android:pathData="m28.197,37.308 l32.616,32.616a1.388,1.388 0.001,0 0,1.962 0l6.079,-6.078a3.892,3.892 90.001,0 0,0 -5.504L45.475,34.962A4.737,4.737 22.5,0 0,42.125 33.575H29.744a2.187,2.187 112.5,0 0,-1.546 3.733z"
android:strokeLineJoin="round"
android:strokeWidth="1.34474"
android:fillColor="#3f51b5"
android:fillAlpha="1"/>
android:strokeColor="#000000"/>
<path
android:pathData="m216.833,270.551v111.624l55.812,-55.812z"
android:strokeWidth="1.2847122"
android:pathData="m46.789,65.896v16.476a1.466,1.466 22.5,0 0,2.502 1.036l7.505,-7.505a3.538,3.538 90,0 0,0 -5.004L50.327,64.431a2.073,2.073 157.5,0 0,-3.538 1.466z"
android:strokeLineJoin="round"
android:strokeWidth="1.34474"
android:fillColor="#4caf50"
android:fillAlpha="1"/>
android:strokeColor="#000000"/>
<path
android:pathData="M327.56,249.449L327.56,137.825l-55.812,55.812z"
android:strokeWidth="1.2847122"
android:pathData="M71.606,51.09V34.614a1.465,1.465 22.5,0 0,-2.502 -1.036l-7.505,7.505a3.538,3.538 90,0 0,0 5.004l6.469,6.469a2.073,2.073 157.5,0 0,3.538 -1.465z"
android:strokeLineJoin="round"
android:strokeWidth="1.34474"
android:fillColor="#ffc107"
android:fillAlpha="1"/>
android:strokeColor="#000000"/>
<path
android:pathData="m382.777,177.29 l-39.465,-39.465v39.465z"
android:strokeWidth="0.6423561"
android:pathData="m81.328,37.785 l-4.315,-4.315a1.099,1.099 157.5,0 0,-1.876 0.777v3.538a2.654,2.654 45,0 0,2.654 2.654h2.439a1.554,1.554 112.5,0 0,1.099 -2.654z"
android:strokeLineJoin="round"
android:strokeWidth="1.34474"
android:fillColor="#ff5722"
android:fillAlpha="1"/>
</group>
android:strokeColor="#000000"/>
</vector>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.5 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View file

@ -0,0 +1,30 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:pathData="m28.197,37.308 l32.616,32.616a1.388,1.388 0.001,0 0,1.962 0l6.079,-6.078a3.892,3.892 90.001,0 0,0 -5.504L45.475,34.962A4.737,4.737 22.5,0 0,42.125 33.575H29.744a2.187,2.187 112.5,0 0,-1.546 3.733z"
android:strokeLineJoin="round"
android:strokeWidth="1.34474"
android:fillColor="#D32F2F"
android:strokeColor="#000000"/>
<path
android:pathData="m46.789,65.896v16.476a1.466,1.466 22.5,0 0,2.502 1.036l7.505,-7.505a3.538,3.538 90,0 0,0 -5.004L50.327,64.431a2.073,2.073 157.5,0 0,-3.538 1.466z"
android:strokeLineJoin="round"
android:strokeWidth="1.34474"
android:fillColor="#4caf50"
android:strokeColor="#000000"/>
<path
android:pathData="M71.606,51.09V34.614a1.465,1.465 22.5,0 0,-2.502 -1.036l-7.505,7.505a3.538,3.538 90,0 0,0 5.004l6.469,6.469a2.073,2.073 157.5,0 0,3.538 -1.465z"
android:strokeLineJoin="round"
android:strokeWidth="1.34474"
android:fillColor="#ffc107"
android:strokeColor="#000000"/>
<path
android:pathData="m81.328,37.785 l-4.315,-4.315a1.099,1.099 157.5,0 0,-1.876 0.777v3.538a2.654,2.654 45,0 0,2.654 2.654h2.439a1.554,1.554 112.5,0 0,1.099 -2.654z"
android:strokeLineJoin="round"
android:strokeWidth="1.34474"
android:fillColor="#ff5722"
android:strokeColor="#000000"/>
</vector>

View file

@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="265.554" height="244.35"><path d="M0 10.84L166.56 177.4l43.778-43.775L87.553 10.84z" fill="#3f51b5"/><path d="M99.61 132.726V244.35l55.812-55.812z" fill="#4caf50"/><path d="M210.337 111.624V0l-55.812 55.812z" fill="#ffc107"/><path d="M265.554 39.465L226.089 0v39.465z" fill="#ff5722"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M3.925 16.034l56.9 56.9a2.42 2.42.001 003.423 0L74.852 62.33a6.79 6.79 90.001 000-9.601L34.067 11.942a8.264 8.264 22.5 00-5.844-2.42h-21.6a3.815 3.815 112.5 00-2.697 6.512z" fill="#3f51b5" stroke="#000" stroke-width="2.346" stroke-linejoin="round"/><path d="M36.36 65.907V94.65a2.557 2.557 22.5 004.364 1.808l13.093-13.094a6.172 6.172 90 000-8.728L42.532 63.35a3.616 3.616 157.5 00-6.172 2.557z" fill="#4caf50" stroke="#000" stroke-width="2.346" stroke-linejoin="round"/><path d="M79.653 40.078V11.335a2.557 2.557 22.5 00-4.364-1.808L62.195 22.62a6.172 6.172 90 000 8.729l11.286 11.285a3.616 3.616 157.5 006.172-2.556z" fill="#ffc107" stroke="#000" stroke-width="2.346" stroke-linejoin="round"/><path d="M96.613 16.867l-7.528-7.528a1.917 1.917 157.5 00-3.273 1.355v6.173a4.63 4.63 45 004.629 4.629h4.255a2.712 2.712 112.5 001.917-4.63z" fill="#ff5722" stroke="#000" stroke-width="2.346" stroke-linejoin="round"/></svg>

Before

Width:  |  Height:  |  Size: 338 B

After

Width:  |  Height:  |  Size: 989 B

View file

@ -1,60 +0,0 @@
import 'package:aves/services/services.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_svg/flutter_svg.dart';
class UriPicture extends PictureProvider<UriPicture> {
const UriPicture({
required this.uri,
required this.mimeType,
ColorFilter? colorFilter,
}) : super(colorFilter);
final String uri, mimeType;
@override
Future<UriPicture> obtainKey(PictureConfiguration picture) {
return SynchronousFuture<UriPicture>(this);
}
@override
PictureStreamCompleter load(UriPicture key, {PictureErrorListener? onError}) {
return OneFramePictureStreamCompleter(_loadAsync(key, onError: onError), informationCollector: () sync* {
yield DiagnosticsProperty<String>('uri', uri);
});
}
Future<PictureInfo?> _loadAsync(UriPicture key, {PictureErrorListener? onError}) async {
assert(key == this);
final data = await imageFileService.getSvg(uri, mimeType);
if (data.isEmpty) {
return null;
}
final decoder = SvgPicture.svgByteDecoder;
if (onError != null) {
return decoder(
data,
colorFilter,
key.toString(),
).catchError((error, stack) async {
onError(error, stack);
return Future<PictureInfo>.error(error, stack);
});
}
return decoder(data, colorFilter, key.toString());
}
@override
bool operator ==(Object other) {
if (other.runtimeType != runtimeType) return false;
return other is UriPicture && other.uri == uri && other.colorFilter == colorFilter;
}
@override
int get hashCode => hashValues(uri, colorFilter);
@override
String toString() => '$runtimeType#${shortHash(this)}{uri=$uri, mimeType=$mimeType, colorFilter=$colorFilter}';
}

View file

@ -197,12 +197,6 @@ class Constants {
licenseUrl: 'https://github.com/mobiten/flutter_staggered_animations/blob/master/LICENSE',
sourceUrl: 'https://github.com/mobiten/flutter_staggered_animations',
),
Dependency(
name: 'Flutter SVG',
license: 'MIT',
licenseUrl: 'https://github.com/dnfield/flutter_svg/blob/master/LICENSE',
sourceUrl: 'https://github.com/dnfield/flutter_svg',
),
Dependency(
name: 'Material Design Icons Flutter',
license: 'MIT',

View file

@ -1,5 +1,4 @@
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
class AvesLogo extends StatelessWidget {
final double size;
@ -16,11 +15,99 @@ class AvesLogo extends StatelessWidget {
radius: size / 2,
child: Padding(
padding: EdgeInsets.only(top: size / 15),
child: SvgPicture.asset(
'assets/aves_logo.svg',
width: size / 1.4,
child: CustomPaint(
size: Size(size / 1.4, size / 1.4),
painter: AvesLogoPainter(),
),
),
);
}
}
class AvesLogoPainter extends CustomPainter {
@override
void paint(Canvas canvas, Size size) {
final dim = size.width / 100;
final strokePaint = Paint()
..style = PaintingStyle.stroke
..color = Colors.black
..strokeWidth = dim * 2.346
..strokeJoin = StrokeJoin.round;
final path0 = Path();
path0.moveTo(dim * 3.925, dim * 16.034);
path0.relativeLineTo(dim * 56.9, dim * 56.9);
path0.relativeArcToPoint(Offset(dim * 3.423, dim * 0), radius: Radius.circular(dim * 2.42), rotation: 0.001, clockwise: false);
path0.lineTo(dim * 74.852, dim * 62.33);
path0.relativeArcToPoint(Offset(dim * 0, dim * -9.601), radius: Radius.circular(dim * 6.79), rotation: 90.001, clockwise: false);
path0.lineTo(dim * 34.067, dim * 11.942);
path0.relativeArcToPoint(Offset(dim * -5.844, dim * -2.42), radius: Radius.circular(dim * 8.264), rotation: 22.5, clockwise: false);
path0.relativeLineTo(dim * -21.6, dim * 0);
path0.relativeArcToPoint(Offset(dim * -2.697, dim * 6.512), radius: Radius.circular(dim * 3.815), rotation: 112.5, clockwise: false);
path0.close();
canvas.drawPath(path0, strokePaint);
canvas.drawPath(
path0,
Paint()
..style = PaintingStyle.fill
..color = const Color(0xff3f51b5),
);
Path path1 = Path();
path1.moveTo(dim * 36.36, dim * 65.907);
path1.lineTo(dim * 36.36, dim * 94.65);
path1.relativeArcToPoint(Offset(dim * 4.364, dim * 1.808), radius: Radius.circular(dim * 2.557), rotation: 22.5, clockwise: false);
path1.relativeLineTo(dim * 13.093, dim * -13.094);
path1.relativeArcToPoint(Offset(dim * 0, dim * -8.728), radius: Radius.circular(dim * 6.172), rotation: 90, clockwise: false);
path1.lineTo(dim * 42.532, dim * 63.35);
path1.relativeArcToPoint(Offset(dim * -6.172, dim * 2.557), radius: Radius.circular(dim * 3.616), rotation: 157.5, clockwise: false);
path1.close();
canvas.drawPath(path1, strokePaint);
canvas.drawPath(
path1,
Paint()
..style = PaintingStyle.fill
..color = const Color(0xff4caf50),
);
Path path2 = Path();
path2.moveTo(dim * 79.653, dim * 40.078);
path2.lineTo(dim * 79.653, dim * 11.335);
path2.relativeArcToPoint(Offset(dim * -4.364, dim * -1.808), radius: Radius.circular(dim * 2.557), rotation: 22.5, clockwise: false);
path2.lineTo(dim * 62.195, dim * 22.62);
path2.relativeArcToPoint(Offset(dim * 0, dim * 8.729), radius: Radius.circular(dim * 6.172), rotation: 90, clockwise: false);
path2.relativeLineTo(dim * 11.286, dim * 11.285);
path2.relativeArcToPoint(Offset(dim * 6.172, dim * -2.556), radius: Radius.circular(dim * 3.616), rotation: 157.5, clockwise: false);
path2.close();
canvas.drawPath(path2, strokePaint);
canvas.drawPath(
path2,
Paint()
..style = PaintingStyle.fill
..color = const Color(0xffffc107),
);
Path path3 = Path();
path3.moveTo(dim * 96.613, dim * 16.867);
path3.relativeLineTo(dim * -7.528, dim * -7.528);
path3.relativeArcToPoint(Offset(dim * -3.273, dim * 1.355), radius: Radius.circular(dim * 1.917), rotation: 157.5, clockwise: false);
path3.relativeLineTo(dim * 0, dim * 6.173);
path3.relativeArcToPoint(Offset(dim * 4.629, dim * 4.629), radius: Radius.circular(dim * 4.63), rotation: 45, clockwise: false);
path3.relativeLineTo(dim * 4.255, dim * 0);
path3.relativeArcToPoint(Offset(dim * 1.917, dim * -4.63), radius: Radius.circular(dim * 2.712), rotation: 112.5, clockwise: false);
path3.close();
canvas.drawPath(path3, strokePaint);
canvas.drawPath(
path3,
Paint()
..style = PaintingStyle.fill
..color = const Color(0xffff5722));
}
@override
bool shouldRepaint(covariant CustomPainter oldDelegate) => true;
}

View file

@ -2,7 +2,6 @@ import 'package:aves/services/services.dart';
import 'package:aves/utils/file_utils.dart';
import 'package:aves/widgets/common/identity/aves_expansion_tile.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
class DebugCacheSection extends StatefulWidget {
const DebugCacheSection({Key? key}) : super(key: key);
@ -39,22 +38,6 @@ class _DebugCacheSectionState extends State<DebugCacheSection> with AutomaticKee
),
],
),
Row(
children: [
Expanded(
child: Text('SVG cache: ${PictureProvider.cache.count} items'),
),
const SizedBox(width: 8),
ElevatedButton(
onPressed: () {
PictureProvider.cache.clear();
setState(() {});
},
child: const Text('Clear'),
),
],
),
Row(
children: [
const Expanded(

View file

@ -335,13 +335,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
flutter_svg:
dependency: "direct main"
description:
name: flutter_svg
url: "https://pub.dartlang.org"
source: hosted
version: "0.22.0"
flutter_test:
dependency: "direct dev"
description: flutter
@ -630,13 +623,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0"
path_drawing:
dependency: transitive
description:
name: path_drawing
url: "https://pub.dartlang.org"
source: hosted
version: "0.5.1"
path_parsing:
dependency: transitive
description:

View file

@ -35,7 +35,6 @@ dependencies:
flutter_map:
flutter_markdown:
flutter_staggered_animations:
flutter_svg:
get_it:
github:
google_api_availability: