This repository has been archived by the owner on Apr 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 125
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
15 changed files
with
430 additions
and
81 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,43 @@ | ||
class DynamicContent { | ||
DynamicContent({required this.description, required this.imageUrls}); | ||
static DynamicContent get zero => | ||
DynamicContent(description: "", imageUrls: []); | ||
import 'package:bili_you/common/models/local/reply/reply_content.dart'; | ||
|
||
abstract class DynamicContent { | ||
DynamicContent({required this.description, required this.emotes}); | ||
String description; | ||
List<String> imageUrls = []; | ||
List<Emote> emotes; | ||
} | ||
|
||
class WordDynamicContent extends DynamicContent { | ||
WordDynamicContent({required super.description, required super.emotes}); | ||
static WordDynamicContent get zero => | ||
WordDynamicContent(description: "", emotes: []); | ||
} | ||
|
||
class AVDynamicContent extends DynamicContent { | ||
AVDynamicContent( | ||
{required super.description, | ||
required super.emotes, | ||
required this.picUrl, | ||
required this.bvid, | ||
required this.title, | ||
required this.subTitle, | ||
required this.duration, | ||
required this.damakuCount, | ||
required this.playCount}); | ||
static AVDynamicContent get zero => AVDynamicContent( | ||
description: "", | ||
emotes: [], | ||
picUrl: '', | ||
title: '', | ||
subTitle: '', | ||
duration: '', | ||
damakuCount: '', | ||
playCount: '', | ||
bvid: ''); | ||
final String picUrl; | ||
final String bvid; | ||
final String title; | ||
final String subTitle; | ||
final String duration; | ||
final String playCount; | ||
final String damakuCount; | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
class IconTextButton extends StatelessWidget { | ||
const IconTextButton({ | ||
super.key, | ||
required this.onPressed, | ||
required this.icon, | ||
required this.text, | ||
this.selected = false, | ||
}); | ||
final Function()? onPressed; | ||
final Icon icon; | ||
final Text text; | ||
|
||
///是否被选上 | ||
final bool selected; | ||
@override | ||
Widget build(BuildContext context) { | ||
return ElevatedButton( | ||
style: ButtonStyle( | ||
foregroundColor: selected | ||
? MaterialStatePropertyAll(Theme.of(context).colorScheme.onPrimary) | ||
: null, | ||
backgroundColor: selected | ||
? MaterialStatePropertyAll(Theme.of(context).colorScheme.primary) | ||
: null, | ||
elevation: const MaterialStatePropertyAll(0), | ||
padding: const MaterialStatePropertyAll(EdgeInsets.all(5)), | ||
), | ||
onPressed: onPressed ?? () {}, | ||
child: FittedBox( | ||
child: Column( | ||
mainAxisAlignment: MainAxisAlignment.center, | ||
children: [icon, text], | ||
), | ||
), | ||
); | ||
} | ||
} |
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
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
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.