Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ohos适配 #805

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions lib/component/sort_group.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,21 @@ class _SortGroupState extends State<SortGroup> {
Widget build(BuildContext context) {
return SegmentedButton(
style: ButtonStyle(backgroundColor:
WidgetStateProperty.resolveWith((Set<WidgetState> states) {
if (states.contains(WidgetState.disabled)) {
MaterialStateProperty.resolveWith((Set<MaterialState> states) {
if (states.contains(MaterialState.disabled)) {
return null;
}
if (states.contains(WidgetState.selected)) {
if (states.contains(MaterialState.selected)) {
return Theme.of(context).colorScheme.secondaryContainer;
}
return Theme.of(context).colorScheme.surface;
})),
segments: [
for (var (index, i) in widget.children.indexed)
ButtonSegment(value: index, label: Text(i)),
for (int index = 0; index < widget.children.length; index++)
ButtonSegment(value: index, label: Text(widget.children[index])),
],
selected: {index},
onSelectionChanged: (p0) {
onSelectionChanged: (Set<int> p0) {
widget.onChange(p0.first);
if (mounted)
setState(() {
Expand All @@ -57,7 +57,7 @@ class _SortGroupState extends State<SortGroup> {
style: TextStyle(color: bgColor),
),
style: ButtonStyle(
backgroundColor: WidgetStateProperty.all<Color>(
backgroundColor: MaterialStateProperty.all<Color>(
index == widget.children.indexOf(i)
? Theme.of(context).colorScheme.primary
: Theme.of(context).cardColor)),
Expand Down
4 changes: 2 additions & 2 deletions lib/component/ugoira_painter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ class UgoiraWidget extends StatefulWidget {
: super(key: key);

@override
_UgoiraWidgetState createState() => _UgoiraWidgetState();
_UgoiraMaterialState createState() => _UgoiraMaterialState();
}

class _UgoiraWidgetState extends State<UgoiraWidget> with RouteAware {
class _UgoiraMaterialState extends State<UgoiraWidget> with RouteAware {
Map<File, ui.Image> _map = Map();

Future<ui.Image> _loadImage(File file) async {
Expand Down
2 changes: 1 addition & 1 deletion lib/constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ class Constants {
static String? code_verifier = null;

/// 为true表示使用FluentUI 否则为false,不应作为Desktop的判断
static final bool isFluent = Platform.isWindows;
static final bool isFluent = false;
}
Loading