diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2862cae..512f3f3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,20 +1,25 @@
-## 0.0.1
-* Random avatar generator.
+## 0.0.8
+* Dependencies upgrade
+* Changed randomAvatar to RandomAvatar
+* Changed randomAvatarString to RandomAvatarString
-## 0.0.2
-* Example added.
+## 0.0.7
+* Height issue fixed
-## 0.0.3
-* Example added to pub.
+## 0.0.6
+* Support this package
+
+## 0.0.5
+* Example main file updated.
## 0.0.4
* Example added to pub.
-## 0.0.5
-* Example main file updated.
+## 0.0.3
+* Example added to pub.
-## 0.0.6
-* Support this package
+## 0.0.2
+* Example added.
-## 0.0.7
-* Height issue fixed
\ No newline at end of file
+## 0.0.1
+* Random avatar generator.
\ No newline at end of file
diff --git a/README.md b/README.md
index 3efd567..51ab52b 100644
--- a/README.md
+++ b/README.md
@@ -23,23 +23,23 @@ dependencies:
get avatar string
```dart
-String svgCode = randomAvatarString('saytoonz');
+String svgCode = RandomAvatarString('saytoonz');
```
get avatar string with transparent background
```dart
-String svgCode = randomAvatarString('saytoonz', trBackground: true);
+String svgCode = RandomAvatarString('saytoonz', trBackground: true);
```
get avatar svg widget
```dart
-Widget svgCode = randomAvatar('saytoonz', height: 50, width: 50);
+Widget svgCode = RandomAvatar('saytoonz', height: 50, width: 50);
```
get avatar svg widget with transparent background
```dart
-Widget svgCode = randomAvatar('saytoonz', trBackground: true, height: 50, width: 50);
+Widget svgCode = RandomAvatar('saytoonz', trBackground: true, height: 50, width: 50);
```
check the example (https://github.com/saytoonz/random_avatar/tree/main/exemple)
@@ -62,14 +62,6 @@ The string of characters is also the input for the Multiavatar package, which co
More info can be found in the `random_avatar.dart` file comments.
-
-
-### Support the package (optional) ###
-If you find this package useful, you can support it for free by giving it a thumbs up at the top of this page. Here's another option to support the package:
-
-
-
-
### License ###
diff --git a/example/lib/main.dart b/example/lib/main.dart
index ce6466d..5e1012a 100644
--- a/example/lib/main.dart
+++ b/example/lib/main.dart
@@ -46,14 +46,14 @@ class _MyHomePageState extends State {
children: [
FloatingActionButton(
onPressed: () {
- String svg = randomAvatarString(
+ String svg = RandomAvatarString(
DateTime.now().toIso8601String(),
trBackground: false,
);
log(svg);
_painters.add(
- randomAvatar(
+ RandomAvatar(
DateTime.now().toIso8601String(),
height: 50,
width: 52,
diff --git a/example/pubspec.lock b/example/pubspec.lock
index 137e998..8ff682b 100644
--- a/example/pubspec.lock
+++ b/example/pubspec.lock
@@ -1,69 +1,78 @@
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
+ args:
+ dependency: transitive
+ description:
+ name: args
+ sha256: "139d809800a412ebb26a3892da228b2d0ba36f0ef5d9a82166e5e52ec8d61611"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.3.2"
async:
dependency: transitive
description:
name: async
- url: "https://pub.dartlang.org"
+ sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0
+ url: "https://pub.dev"
source: hosted
- version: "2.8.2"
+ version: "2.10.0"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
- url: "https://pub.dartlang.org"
+ sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
+ url: "https://pub.dev"
source: hosted
- version: "2.1.0"
+ version: "2.1.1"
characters:
dependency: transitive
description:
name: characters
- url: "https://pub.dartlang.org"
+ sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c
+ url: "https://pub.dev"
source: hosted
- version: "1.2.0"
- charcode:
- dependency: transitive
- description:
- name: charcode
- url: "https://pub.dartlang.org"
- source: hosted
- version: "1.3.1"
+ version: "1.2.1"
clock:
dependency: transitive
description:
name: clock
- url: "https://pub.dartlang.org"
+ sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
+ url: "https://pub.dev"
source: hosted
- version: "1.1.0"
+ version: "1.1.1"
collection:
dependency: transitive
description:
name: collection
- url: "https://pub.dartlang.org"
+ sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0
+ url: "https://pub.dev"
source: hosted
- version: "1.16.0"
+ version: "1.17.0"
crypto:
dependency: transitive
description:
name: crypto
- url: "https://pub.dartlang.org"
+ sha256: aa274aa7774f8964e4f4f38cc994db7b6158dd36e9187aaceaddc994b35c6c67
+ url: "https://pub.dev"
source: hosted
- version: "3.0.1"
+ version: "3.0.2"
cupertino_icons:
dependency: "direct main"
description:
name: cupertino_icons
- url: "https://pub.dartlang.org"
+ sha256: caac504f942f41dfadcf45229ce8c47065b93919a12739f20d6173a883c5ec73
+ url: "https://pub.dev"
source: hosted
version: "1.0.2"
fake_async:
dependency: transitive
description:
name: fake_async
- url: "https://pub.dartlang.org"
+ sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
+ url: "https://pub.dev"
source: hosted
- version: "1.3.0"
+ version: "1.3.1"
flutter:
dependency: "direct main"
description: flutter
@@ -73,84 +82,94 @@ packages:
dependency: "direct dev"
description:
name: flutter_lints
- url: "https://pub.dartlang.org"
+ sha256: b543301ad291598523947dc534aaddc5aaad597b709d2426d3a0e0d44c5cb493
+ url: "https://pub.dev"
source: hosted
version: "1.0.4"
flutter_svg:
dependency: transitive
description:
name: flutter_svg
- url: "https://pub.dartlang.org"
+ sha256: f999d84ad2efda1c4c3956e7968b713b3a24b06f0a0e4798e844e16bbb9bb70b
+ url: "https://pub.dev"
source: hosted
- version: "1.0.3"
+ version: "2.0.0+1"
flutter_test:
dependency: "direct dev"
description: flutter
source: sdk
version: "0.0.0"
+ js:
+ dependency: transitive
+ description:
+ name: js
+ sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.6.5"
lints:
dependency: transitive
description:
name: lints
- url: "https://pub.dartlang.org"
+ sha256: a2c3d198cb5ea2e179926622d433331d8b58374ab8f29cdda6e863bd62fd369c
+ url: "https://pub.dev"
source: hosted
version: "1.0.1"
matcher:
dependency: transitive
description:
name: matcher
- url: "https://pub.dartlang.org"
+ sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72"
+ url: "https://pub.dev"
source: hosted
- version: "0.12.11"
+ version: "0.12.13"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
- url: "https://pub.dartlang.org"
+ sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
+ url: "https://pub.dev"
source: hosted
- version: "0.1.4"
+ version: "0.2.0"
meta:
dependency: transitive
description:
name: meta
- url: "https://pub.dartlang.org"
+ sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42"
+ url: "https://pub.dev"
source: hosted
- version: "1.7.0"
+ version: "1.8.0"
path:
dependency: transitive
description:
name: path
- url: "https://pub.dartlang.org"
+ sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b
+ url: "https://pub.dev"
source: hosted
- version: "1.8.1"
- path_drawing:
- dependency: transitive
- description:
- name: path_drawing
- url: "https://pub.dartlang.org"
- source: hosted
- version: "1.0.0"
+ version: "1.8.2"
path_parsing:
dependency: transitive
description:
name: path_parsing
- url: "https://pub.dartlang.org"
+ sha256: e3e67b1629e6f7e8100b367d3db6ba6af4b1f0bb80f64db18ef1fbabd2fa9ccf
+ url: "https://pub.dev"
source: hosted
- version: "1.0.0"
+ version: "1.0.1"
petitparser:
dependency: transitive
description:
name: petitparser
- url: "https://pub.dartlang.org"
+ sha256: "49392a45ced973e8d94a85fdb21293fbb40ba805fc49f2965101ae748a3683b4"
+ url: "https://pub.dev"
source: hosted
- version: "4.4.0"
+ version: "5.1.0"
random_avatar:
dependency: "direct main"
description:
path: ".."
relative: true
source: path
- version: "0.0.7"
+ version: "0.0.8"
sky_engine:
dependency: transitive
description: flutter
@@ -160,65 +179,98 @@ packages:
dependency: transitive
description:
name: source_span
- url: "https://pub.dartlang.org"
+ sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250
+ url: "https://pub.dev"
source: hosted
- version: "1.8.2"
+ version: "1.9.1"
stack_trace:
dependency: transitive
description:
name: stack_trace
- url: "https://pub.dartlang.org"
+ sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
+ url: "https://pub.dev"
source: hosted
- version: "1.10.0"
+ version: "1.11.0"
stream_channel:
dependency: transitive
description:
name: stream_channel
- url: "https://pub.dartlang.org"
+ sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
+ url: "https://pub.dev"
source: hosted
- version: "2.1.0"
+ version: "2.1.1"
string_scanner:
dependency: transitive
description:
name: string_scanner
- url: "https://pub.dartlang.org"
+ sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
+ url: "https://pub.dev"
source: hosted
- version: "1.1.0"
+ version: "1.2.0"
term_glyph:
dependency: transitive
description:
name: term_glyph
- url: "https://pub.dartlang.org"
+ sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
+ url: "https://pub.dev"
source: hosted
- version: "1.2.0"
+ version: "1.2.1"
test_api:
dependency: transitive
description:
name: test_api
- url: "https://pub.dartlang.org"
+ sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206
+ url: "https://pub.dev"
source: hosted
- version: "0.4.9"
+ version: "0.4.16"
typed_data:
dependency: transitive
description:
name: typed_data
- url: "https://pub.dartlang.org"
+ sha256: "53bdf7e979cfbf3e28987552fd72f637e63f3c8724c9e56d9246942dc2fa36ee"
+ url: "https://pub.dev"
source: hosted
version: "1.3.0"
+ vector_graphics:
+ dependency: transitive
+ description:
+ name: vector_graphics
+ sha256: "09562ef5f47aa84f6567495adb6b9cb2a3192b82c352623b8bd00b300d62603b"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.0.1"
+ vector_graphics_codec:
+ dependency: transitive
+ description:
+ name: vector_graphics_codec
+ sha256: "886e57742644ebed024dc3ade29712e37eea1b03d294fb314c0a3386243fe5a6"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.0.1"
+ vector_graphics_compiler:
+ dependency: transitive
+ description:
+ name: vector_graphics_compiler
+ sha256: "5d9010c4a292766c55395b2288532579a85673f8148460d1e233d98ffe10d24e"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.0.1"
vector_math:
dependency: transitive
description:
name: vector_math
- url: "https://pub.dartlang.org"
+ sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
+ url: "https://pub.dev"
source: hosted
- version: "2.1.2"
+ version: "2.1.4"
xml:
dependency: transitive
description:
name: xml
- url: "https://pub.dartlang.org"
+ sha256: "979ee37d622dec6365e2efa4d906c37470995871fe9ae080d967e192d88286b5"
+ url: "https://pub.dev"
source: hosted
- version: "5.3.1"
+ version: "6.2.2"
sdks:
- dart: ">=2.17.0-0 <3.0.0"
- flutter: ">=2.4.0-0.0.pre"
+ dart: ">=2.19.0-0 <3.0.0"
+ flutter: ">=3.7.0-0"
diff --git a/lib/random_avatar.dart b/lib/random_avatar.dart
index cc14fa1..d91df0e 100644
--- a/lib/random_avatar.dart
+++ b/lib/random_avatar.dart
@@ -1,3 +1,5 @@
+// ignore_for_file: non_constant_identifier_names
+
library multiavatar;
import 'dart:convert';
@@ -5,7 +7,7 @@ import 'package:crypto/crypto.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_svg/flutter_svg.dart';
-Widget randomAvatar(
+Widget RandomAvatar(
String string, {
bool trBackground = false,
Key? key,
@@ -16,16 +18,13 @@ Widget randomAvatar(
bool matchTextDirection = false,
bool allowDrawingOutsideViewBox = false,
WidgetBuilder? placeholderBuilder,
- Color? color,
- BlendMode colorBlendMode = BlendMode.srcIn,
String? semanticsLabel,
bool excludeFromSemantics = false,
- Clip clipBehavior = Clip.hardEdge,
- bool cacheColorFilter = false,
- SvgTheme? theme,
+ ColorFilter? colorFilter,
+ SvgTheme theme = const SvgTheme(),
}) {
return SvgPicture.string(
- randomAvatarString(string, trBackground: trBackground),
+ RandomAvatarString(string, trBackground: trBackground),
key: key,
width: width,
height: height,
@@ -34,12 +33,9 @@ Widget randomAvatar(
matchTextDirection: matchTextDirection,
allowDrawingOutsideViewBox: allowDrawingOutsideViewBox,
placeholderBuilder: placeholderBuilder,
- color: color,
- colorBlendMode: colorBlendMode,
semanticsLabel: semanticsLabel,
excludeFromSemantics: excludeFromSemantics,
- clipBehavior: clipBehavior,
- cacheColorFilter: cacheColorFilter,
+ colorFilter: colorFilter,
theme: theme,
);
}
@@ -47,7 +43,7 @@ Widget randomAvatar(
/// required String string, random string to use as a start of svg generation
/// bool trBackground = true; Set background color to transparent
-String randomAvatarString(String string, {bool trBackground = false}) {
+String RandomAvatarString(String string, {bool trBackground = false}) {
string += '';
Map>>> themes = {
diff --git a/pubspec.lock b/pubspec.lock
index 9db3ba0..a2a67e0 100644
--- a/pubspec.lock
+++ b/pubspec.lock
@@ -1,62 +1,70 @@
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
+ args:
+ dependency: transitive
+ description:
+ name: args
+ sha256: "139d809800a412ebb26a3892da228b2d0ba36f0ef5d9a82166e5e52ec8d61611"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.3.2"
async:
dependency: transitive
description:
name: async
- url: "https://pub.dartlang.org"
+ sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0
+ url: "https://pub.dev"
source: hosted
- version: "2.8.2"
+ version: "2.10.0"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
- url: "https://pub.dartlang.org"
+ sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
+ url: "https://pub.dev"
source: hosted
- version: "2.1.0"
+ version: "2.1.1"
characters:
dependency: transitive
description:
name: characters
- url: "https://pub.dartlang.org"
- source: hosted
- version: "1.2.0"
- charcode:
- dependency: transitive
- description:
- name: charcode
- url: "https://pub.dartlang.org"
+ sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c
+ url: "https://pub.dev"
source: hosted
- version: "1.3.1"
+ version: "1.2.1"
clock:
dependency: transitive
description:
name: clock
- url: "https://pub.dartlang.org"
+ sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
+ url: "https://pub.dev"
source: hosted
- version: "1.1.0"
+ version: "1.1.1"
collection:
dependency: transitive
description:
name: collection
- url: "https://pub.dartlang.org"
+ sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0
+ url: "https://pub.dev"
source: hosted
- version: "1.16.0"
+ version: "1.17.0"
crypto:
dependency: "direct main"
description:
name: crypto
- url: "https://pub.dartlang.org"
+ sha256: aa274aa7774f8964e4f4f38cc994db7b6158dd36e9187aaceaddc994b35c6c67
+ url: "https://pub.dev"
source: hosted
- version: "3.0.1"
+ version: "3.0.2"
fake_async:
dependency: transitive
description:
name: fake_async
- url: "https://pub.dartlang.org"
+ sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
+ url: "https://pub.dev"
source: hosted
- version: "1.3.0"
+ version: "1.3.1"
flutter:
dependency: "direct main"
description: flutter
@@ -66,63 +74,71 @@ packages:
dependency: "direct main"
description:
name: flutter_svg
- url: "https://pub.dartlang.org"
+ sha256: f999d84ad2efda1c4c3956e7968b713b3a24b06f0a0e4798e844e16bbb9bb70b
+ url: "https://pub.dev"
source: hosted
- version: "1.0.3"
+ version: "2.0.0+1"
flutter_test:
dependency: "direct dev"
description: flutter
source: sdk
version: "0.0.0"
+ js:
+ dependency: transitive
+ description:
+ name: js
+ sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.6.5"
matcher:
dependency: transitive
description:
name: matcher
- url: "https://pub.dartlang.org"
+ sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72"
+ url: "https://pub.dev"
source: hosted
- version: "0.12.11"
+ version: "0.12.13"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
- url: "https://pub.dartlang.org"
+ sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
+ url: "https://pub.dev"
source: hosted
- version: "0.1.4"
+ version: "0.2.0"
meta:
dependency: transitive
description:
name: meta
- url: "https://pub.dartlang.org"
+ sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42"
+ url: "https://pub.dev"
source: hosted
- version: "1.7.0"
+ version: "1.8.0"
path:
dependency: transitive
description:
name: path
- url: "https://pub.dartlang.org"
+ sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b
+ url: "https://pub.dev"
source: hosted
- version: "1.8.1"
- path_drawing:
- dependency: transitive
- description:
- name: path_drawing
- url: "https://pub.dartlang.org"
- source: hosted
- version: "1.0.0"
+ version: "1.8.2"
path_parsing:
dependency: transitive
description:
name: path_parsing
- url: "https://pub.dartlang.org"
+ sha256: e3e67b1629e6f7e8100b367d3db6ba6af4b1f0bb80f64db18ef1fbabd2fa9ccf
+ url: "https://pub.dev"
source: hosted
- version: "1.0.0"
+ version: "1.0.1"
petitparser:
dependency: transitive
description:
name: petitparser
- url: "https://pub.dartlang.org"
+ sha256: "49392a45ced973e8d94a85fdb21293fbb40ba805fc49f2965101ae748a3683b4"
+ url: "https://pub.dev"
source: hosted
- version: "4.4.0"
+ version: "5.1.0"
sky_engine:
dependency: transitive
description: flutter
@@ -132,65 +148,98 @@ packages:
dependency: transitive
description:
name: source_span
- url: "https://pub.dartlang.org"
+ sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250
+ url: "https://pub.dev"
source: hosted
- version: "1.8.2"
+ version: "1.9.1"
stack_trace:
dependency: transitive
description:
name: stack_trace
- url: "https://pub.dartlang.org"
+ sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
+ url: "https://pub.dev"
source: hosted
- version: "1.10.0"
+ version: "1.11.0"
stream_channel:
dependency: transitive
description:
name: stream_channel
- url: "https://pub.dartlang.org"
+ sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
+ url: "https://pub.dev"
source: hosted
- version: "2.1.0"
+ version: "2.1.1"
string_scanner:
dependency: transitive
description:
name: string_scanner
- url: "https://pub.dartlang.org"
+ sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
+ url: "https://pub.dev"
source: hosted
- version: "1.1.0"
+ version: "1.2.0"
term_glyph:
dependency: transitive
description:
name: term_glyph
- url: "https://pub.dartlang.org"
+ sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
+ url: "https://pub.dev"
source: hosted
- version: "1.2.0"
+ version: "1.2.1"
test_api:
dependency: transitive
description:
name: test_api
- url: "https://pub.dartlang.org"
+ sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206
+ url: "https://pub.dev"
source: hosted
- version: "0.4.9"
+ version: "0.4.16"
typed_data:
dependency: transitive
description:
name: typed_data
- url: "https://pub.dartlang.org"
+ sha256: "53bdf7e979cfbf3e28987552fd72f637e63f3c8724c9e56d9246942dc2fa36ee"
+ url: "https://pub.dev"
source: hosted
version: "1.3.0"
+ vector_graphics:
+ dependency: transitive
+ description:
+ name: vector_graphics
+ sha256: "09562ef5f47aa84f6567495adb6b9cb2a3192b82c352623b8bd00b300d62603b"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.0.1"
+ vector_graphics_codec:
+ dependency: transitive
+ description:
+ name: vector_graphics_codec
+ sha256: "886e57742644ebed024dc3ade29712e37eea1b03d294fb314c0a3386243fe5a6"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.0.1"
+ vector_graphics_compiler:
+ dependency: transitive
+ description:
+ name: vector_graphics_compiler
+ sha256: "5d9010c4a292766c55395b2288532579a85673f8148460d1e233d98ffe10d24e"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.0.1"
vector_math:
dependency: transitive
description:
name: vector_math
- url: "https://pub.dartlang.org"
+ sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
+ url: "https://pub.dev"
source: hosted
- version: "2.1.2"
+ version: "2.1.4"
xml:
dependency: transitive
description:
name: xml
- url: "https://pub.dartlang.org"
+ sha256: "979ee37d622dec6365e2efa4d906c37470995871fe9ae080d967e192d88286b5"
+ url: "https://pub.dev"
source: hosted
- version: "5.3.1"
+ version: "6.2.2"
sdks:
- dart: ">=2.17.0-0 <3.0.0"
- flutter: ">=2.4.0-0.0.pre"
+ dart: ">=2.19.0-0 <3.0.0"
+ flutter: ">=3.7.0-0"
diff --git a/pubspec.yaml b/pubspec.yaml
index 44a8355..830b421 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,6 +1,6 @@
name: random_avatar
description: Random Avatar is a multicultural avatar maker. 12 billion unique multicultural avatars
-version: 0.0.7
+version: 0.0.8
homepage: https://github.com/saytoonz/random_avatar
documentation: https://github.com/saytoonz/random_avatar
@@ -11,8 +11,8 @@ environment:
dependencies:
flutter:
sdk: flutter
- crypto: ^3.0.0
- flutter_svg: ^1.0.3
+ crypto: ^3.0.2
+ flutter_svg: ^2.0.0+1
dev_dependencies:
flutter_test:
diff --git a/test/random_avatar_test.dart b/test/random_avatar_test.dart
index da9a22c..53fb5b9 100644
--- a/test/random_avatar_test.dart
+++ b/test/random_avatar_test.dart
@@ -1,16 +1,26 @@
+import 'package:flutter/widgets.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:random_avatar/random_avatar.dart';
void main() {
- test('Generate svg file', () {
- final svgCode = randomAvatarString("Saytoonz");
- final noBackgroundAvatar =
- randomAvatarString('Saytoonz)5', trBackground: true);
- final avatarWidget = randomAvatar('Saytoonz)5', trBackground: true);
+ group("Generate SVG", () {
+ test('SVG String with background', () {
+ String svgCode = RandomAvatarString("Saytoonz");
+ //SVG String with background would be generated
+ print(svgCode);
+ });
- /// use svg package to handle this generated string
- print(svgCode);
- print(noBackgroundAvatar);
- print(avatarWidget);
+ test('SVG String with a transparent background', () {
+ String noBackgroundAvatar =
+ RandomAvatarString('Saytoonz)5', trBackground: true);
+ //SVG String with a transparent background would be generated
+ print(noBackgroundAvatar);
+ });
+
+ test('SVG Widget', () {
+ Widget avatarWidget = RandomAvatar('Saytoonz)5', trBackground: true);
+ //SVG Widget would be generated
+ print(avatarWidget);
+ });
});
}