New animated sending widget

This commit is contained in:
Ankit Mahato
2023-04-16 15:02:05 +05:30
parent c36b29158c
commit 7bb76a888e
7 changed files with 30 additions and 28 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 181 KiB

1
assets/sending.json Normal file

File diff suppressed because one or more lines are too long

View File

@ -69,30 +69,3 @@ class NotSentWidget extends StatelessWidget {
);
}
}
class SendingWidget extends StatelessWidget {
const SendingWidget({super.key});
@override
Widget build(BuildContext context) {
final color = Theme.of(context).colorScheme.secondary;
return Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
ColorFiltered(
colorFilter: ColorFilter.mode(
//Color.fromARGB(123, 71, 84, 179),
color.withOpacity(0.7),
BlendMode.dstIn,
),
child: const Image(
image: sendingIndicator,
width: 300,
),
),
],
),
);
}
}

View File

@ -0,0 +1,18 @@
import 'package:flutter/material.dart';
import 'package:lottie/lottie.dart';
class SendingWidget extends StatelessWidget {
const SendingWidget({super.key});
@override
Widget build(BuildContext context) {
return Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Lottie.asset("assets/sending.json"),
],
),
);
}
}

View File

@ -5,3 +5,4 @@ export 'previewer.dart';
export 'code_previewer.dart';
export 'codegen_previewer.dart';
export 'error_message.dart';
export 'sending_widget.dart';

View File

@ -328,6 +328,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.1.1"
lottie:
dependency: "direct main"
description:
name: lottie
sha256: "23522951540d20a57a60202ed7022e6376bed206a4eee1c347a91f58bd57eb9f"
url: "https://pub.dev"
source: hosted
version: "2.3.2"
matcher:
dependency: transitive
description:

View File

@ -26,6 +26,7 @@ dependencies:
url: https://github.com/google/flutter-desktop-embedding.git
path: plugins/window_size
hive_flutter: ^1.1.0
lottie: ^2.3.2
dev_dependencies:
flutter_test:
@ -38,4 +39,4 @@ flutter:
uses-material-design: true
assets:
- google_fonts/
- assets/sending.gif
- assets/