-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
240 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
frontend/appflowy_flutter/lib/plugins/ai_chat/presentation/chat_loading.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
import 'package:flowy_infra/theme_extension.dart'; | ||
import 'package:flowy_infra_ui/widget/spacing.dart'; | ||
import 'package:flutter/material.dart'; | ||
import 'package:shimmer/shimmer.dart'; | ||
|
||
class ChatAILoading extends StatelessWidget { | ||
const ChatAILoading({super.key}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Shimmer.fromColors( | ||
baseColor: AFThemeExtension.of(context).lightGreyHover, | ||
highlightColor: | ||
AFThemeExtension.of(context).lightGreyHover.withOpacity(0.5), | ||
period: const Duration(seconds: 3), | ||
child: const ContentPlaceholder(), | ||
); | ||
} | ||
} | ||
|
||
class ContentPlaceholder extends StatelessWidget { | ||
const ContentPlaceholder({super.key}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Padding( | ||
padding: const EdgeInsets.symmetric(horizontal: 16.0), | ||
child: Column( | ||
crossAxisAlignment: CrossAxisAlignment.start, | ||
children: [ | ||
Row( | ||
mainAxisSize: MainAxisSize.min, | ||
crossAxisAlignment: CrossAxisAlignment.start, | ||
children: [ | ||
Container( | ||
width: 30, | ||
height: 16.0, | ||
margin: const EdgeInsets.only(bottom: 8.0), | ||
decoration: BoxDecoration( | ||
color: AFThemeExtension.of(context).lightGreyHover, | ||
borderRadius: BorderRadius.circular(4.0), | ||
), | ||
), | ||
const HSpace(10), | ||
Container( | ||
width: 100, | ||
height: 16.0, | ||
margin: const EdgeInsets.only(bottom: 8.0), | ||
decoration: BoxDecoration( | ||
color: AFThemeExtension.of(context).lightGreyHover, | ||
borderRadius: BorderRadius.circular(4.0), | ||
), | ||
), | ||
], | ||
), | ||
Container( | ||
width: 140, | ||
height: 16.0, | ||
margin: const EdgeInsets.only(bottom: 8.0), | ||
decoration: BoxDecoration( | ||
color: AFThemeExtension.of(context).lightGreyHover, | ||
borderRadius: BorderRadius.circular(4.0), | ||
), | ||
), | ||
], | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.