diff --git a/images/screenshots/2022_2_4_main1.png b/images/screenshots/2022_2_4_main1.png deleted file mode 100644 index ef6422b..0000000 Binary files a/images/screenshots/2022_2_4_main1.png and /dev/null differ diff --git a/images/screenshots/2022_2_4_main2.png b/images/screenshots/2022_2_4_main2.png deleted file mode 100644 index dddbd18..0000000 Binary files a/images/screenshots/2022_2_4_main2.png and /dev/null differ diff --git a/images/screenshots/audio_bubble.png b/images/screenshots/audio_bubble.png deleted file mode 100644 index 263fee3..0000000 Binary files a/images/screenshots/audio_bubble.png and /dev/null differ diff --git a/images/screenshots/datechip.png b/images/screenshots/datechip.png deleted file mode 100644 index 79f10c6..0000000 Binary files a/images/screenshots/datechip.png and /dev/null differ diff --git a/images/screenshots/imsg.png b/images/screenshots/imsg.png deleted file mode 100644 index ab2e053..0000000 Binary files a/images/screenshots/imsg.png and /dev/null differ diff --git a/images/screenshots/screenshot_1.png b/images/screenshots/screenshot_1.png deleted file mode 100644 index 8f6d10b..0000000 Binary files a/images/screenshots/screenshot_1.png and /dev/null differ diff --git a/images/screenshots/screenshot_1_old.png b/images/screenshots/screenshot_1_old.png deleted file mode 100644 index d9374c3..0000000 Binary files a/images/screenshots/screenshot_1_old.png and /dev/null differ diff --git a/images/screenshots/screenshot_2.png b/images/screenshots/screenshot_2.png deleted file mode 100644 index 90d502c..0000000 Binary files a/images/screenshots/screenshot_2.png and /dev/null differ diff --git a/images/screenshots/screenshot_2_old.png b/images/screenshots/screenshot_2_old.png deleted file mode 100644 index a087bf6..0000000 Binary files a/images/screenshots/screenshot_2_old.png and /dev/null differ diff --git a/images/screenshots/screenshot_3_old.png b/images/screenshots/screenshot_3_old.png deleted file mode 100644 index 77164c2..0000000 Binary files a/images/screenshots/screenshot_3_old.png and /dev/null differ diff --git a/images/screenshots/screenshot_4_old.png b/images/screenshots/screenshot_4_old.png deleted file mode 100644 index b269f31..0000000 Binary files a/images/screenshots/screenshot_4_old.png and /dev/null differ diff --git a/images/screenshots/single_bubble.png b/images/screenshots/single_bubble.png deleted file mode 100644 index df75f36..0000000 Binary files a/images/screenshots/single_bubble.png and /dev/null differ diff --git a/lib/bubbles/bubble_normal.dart b/lib/bubbles/bubble_normal.dart index 4615a28..4324654 100644 --- a/lib/bubbles/bubble_normal.dart +++ b/lib/bubbles/bubble_normal.dart @@ -22,6 +22,9 @@ class BubbleNormal extends StatelessWidget { final bool sent; final bool delivered; final bool seen; + final Color? sentColor; + final Color? deliveredColor; + final Color? seenColor; final TextStyle textStyle; BubbleNormal({ @@ -34,6 +37,9 @@ class BubbleNormal extends StatelessWidget { this.sent = false, this.delivered = false, this.seen = false, + this.sentColor, + this.deliveredColor, + this.seenColor, this.textStyle = const TextStyle( color: Colors.black87, fontSize: 16, @@ -45,28 +51,28 @@ class BubbleNormal extends StatelessWidget { Widget build(BuildContext context) { bool stateTick = false; Icon? stateIcon; - if (sent) { + if (sent) { stateTick = true; - stateIcon = Icon( + stateIcon = Icon( Icons.done, size: 18, - color: Color(0xFF97AD8E), + color: sentColor == null ? Color(0xFF97AD8E) : sentColor, ); } if (delivered) { stateTick = true; - stateIcon = Icon( + stateIcon = Icon( Icons.done_all, size: 18, - color: Color(0xFF97AD8E), + color: deliveredColor == null ? Color(0xFF97AD8E) : deliveredColor, ); } if (seen) { stateTick = true; - stateIcon = Icon( + stateIcon = Icon( Icons.done_all, size: 18, - color: Color(0xFF92DEDA), + color: seenColor == null ? Color(0xFF92DEDA) : seenColor, ); } diff --git a/lib/bubbles/bubble_normal_audio.dart b/lib/bubbles/bubble_normal_audio.dart index e02a1fc..3c4f683 100644 --- a/lib/bubbles/bubble_normal_audio.dart +++ b/lib/bubbles/bubble_normal_audio.dart @@ -33,6 +33,9 @@ class BubbleNormalAudio extends StatelessWidget { final bool sent; final bool delivered; final bool seen; + final Color? sentColor; + final Color? deliveredColor; + final Color? seenColor; final TextStyle textStyle; BubbleNormalAudio({ @@ -51,6 +54,9 @@ class BubbleNormalAudio extends StatelessWidget { this.sent = false, this.delivered = false, this.seen = false, + this.sentColor, + this.deliveredColor, + this.seenColor, this.textStyle = const TextStyle( color: Colors.black87, fontSize: 12, @@ -64,26 +70,26 @@ class BubbleNormalAudio extends StatelessWidget { Icon? stateIcon; if (sent) { stateTick = true; - stateIcon = Icon( + stateIcon = Icon( Icons.done, size: 18, - color: Color(0xFF97AD8E), + color: sentColor == null ? Color(0xFF97AD8E) : sentColor, ); } if (delivered) { stateTick = true; - stateIcon = Icon( + stateIcon = Icon( Icons.done_all, size: 18, - color: Color(0xFF97AD8E), + color: deliveredColor == null ? Color(0xFF97AD8E) : deliveredColor, ); } if (seen) { stateTick = true; - stateIcon = Icon( + stateIcon = Icon( Icons.done_all, size: 18, - color: Color(0xFF92DEDA), + color: seenColor == null ? Color(0xFF92DEDA) : seenColor, ); } diff --git a/lib/bubbles/bubble_special_one.dart b/lib/bubbles/bubble_special_one.dart index c33e72e..3f58b28 100644 --- a/lib/bubbles/bubble_special_one.dart +++ b/lib/bubbles/bubble_special_one.dart @@ -17,6 +17,9 @@ class BubbleSpecialOne extends StatelessWidget { final bool sent; final bool delivered; final bool seen; + final Color? sentColor; + final Color? deliveredColor; + final Color? seenColor; final TextStyle textStyle; const BubbleSpecialOne({ @@ -28,6 +31,9 @@ class BubbleSpecialOne extends StatelessWidget { this.sent = false, this.delivered = false, this.seen = false, + this.sentColor, + this.deliveredColor, + this.seenColor, this.textStyle = const TextStyle( color: Colors.black87, fontSize: 16, @@ -39,28 +45,28 @@ class BubbleSpecialOne extends StatelessWidget { Widget build(BuildContext context) { bool stateTick = false; Icon? stateIcon; - if (sent) { + if (sent) { stateTick = true; - stateIcon = Icon( + stateIcon = Icon( Icons.done, size: 18, - color: Color(0xFF97AD8E), + color: sentColor == null ? Color(0xFF97AD8E) : sentColor, ); } if (delivered) { stateTick = true; - stateIcon = Icon( + stateIcon = Icon( Icons.done_all, size: 18, - color: Color(0xFF97AD8E), + color: deliveredColor == null ? Color(0xFF97AD8E) : deliveredColor, ); } if (seen) { stateTick = true; - stateIcon = Icon( + stateIcon = Icon( Icons.done_all, size: 18, - color: Color(0xFF92DEDA), + color: seenColor == null ? Color(0xFF92DEDA) : seenColor, ); } diff --git a/lib/bubbles/bubble_special_three.dart b/lib/bubbles/bubble_special_three.dart index 6e55eb6..fd2682f 100644 --- a/lib/bubbles/bubble_special_three.dart +++ b/lib/bubbles/bubble_special_three.dart @@ -17,6 +17,9 @@ class BubbleSpecialThree extends StatelessWidget { final bool sent; final bool delivered; final bool seen; + final Color? sentColor; + final Color? deliveredColor; + final Color? seenColor; final TextStyle textStyle; const BubbleSpecialThree({ @@ -28,6 +31,9 @@ class BubbleSpecialThree extends StatelessWidget { this.sent = false, this.delivered = false, this.seen = false, + this.sentColor, + this.deliveredColor, + this.seenColor, this.textStyle = const TextStyle( color: Colors.black87, fontSize: 16, @@ -41,26 +47,26 @@ class BubbleSpecialThree extends StatelessWidget { Icon? stateIcon; if (sent) { stateTick = true; - stateIcon = const Icon( + stateIcon = Icon( Icons.done, size: 18, - color: Color(0xFF97AD8E), + color: sentColor == null ? Color(0xFF97AD8E) : sentColor, ); } if (delivered) { stateTick = true; - stateIcon = const Icon( + stateIcon = Icon( Icons.done_all, size: 18, - color: Color(0xFF97AD8E), + color: deliveredColor == null ? Color(0xFF97AD8E) : deliveredColor, ); } if (seen) { stateTick = true; - stateIcon = const Icon( + stateIcon = Icon( Icons.done_all, size: 18, - color: Color(0xFF92DEDA), + color: seenColor == null ? Color(0xFF92DEDA) : seenColor, ); } @@ -84,6 +90,7 @@ class BubbleSpecialThree extends StatelessWidget { : const EdgeInsets.fromLTRB(17, 7, 7, 7), child: Stack( children: [ + Padding( padding: stateTick ? const EdgeInsets.only(left: 4, right: 20) diff --git a/lib/bubbles/bubble_special_two.dart b/lib/bubbles/bubble_special_two.dart index c4c0cf4..6d33aa9 100644 --- a/lib/bubbles/bubble_special_two.dart +++ b/lib/bubbles/bubble_special_two.dart @@ -17,6 +17,9 @@ class BubbleSpecialTwo extends StatelessWidget { final bool sent; final bool delivered; final bool seen; + final Color? sentColor; + final Color? deliveredColor; + final Color? seenColor; final TextStyle textStyle; const BubbleSpecialTwo({ @@ -28,6 +31,9 @@ class BubbleSpecialTwo extends StatelessWidget { this.sent = false, this.delivered = false, this.seen = false, + this.sentColor, + this.deliveredColor, + this.seenColor, this.textStyle = const TextStyle( color: Colors.black87, fontSize: 16, @@ -39,28 +45,28 @@ class BubbleSpecialTwo extends StatelessWidget { Widget build(BuildContext context) { bool stateTick = false; Icon? stateIcon; - if (sent) { + if (sent) { stateTick = true; - stateIcon = Icon( + stateIcon = Icon( Icons.done, size: 18, - color: Color(0xFF97AD8E), + color: sentColor == null ? Color(0xFF97AD8E) : sentColor, ); } if (delivered) { stateTick = true; - stateIcon = Icon( + stateIcon = Icon( Icons.done_all, size: 18, - color: Color(0xFF97AD8E), + color: deliveredColor == null ? Color(0xFF97AD8E) : deliveredColor, ); } if (seen) { stateTick = true; - stateIcon = Icon( + stateIcon = Icon( Icons.done_all, size: 18, - color: Color(0xFF92DEDA), + color: seenColor == null ? Color(0xFF92DEDA) : seenColor, ); } diff --git a/pubspec.yaml b/pubspec.yaml index 8676813..7d3c28e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: chat_bubbles description: Flutter chat bubble widgets, similar to Whatsapp and more shapes. Easy to use and implement chat bubbles. -version: 1.2.0 +version: 1.3.0 homepage: https://github.com/prahack/chat_bubbles environment: