Skip to content

Instantly share code, notes, and snippets.

@WinXaito
Created January 21, 2022 16:51
Show Gist options
  • Save WinXaito/1e767b25e34a67561603a6b63db4b45b to your computer and use it in GitHub Desktop.
Save WinXaito/1e767b25e34a67561603a6b63db4b45b to your computer and use it in GitHub Desktop.
fluent reorderable list bug in dark mode
import 'package:flutter/widgets.dart';
import 'package:flutter/material.dart' as m;
import 'package:fluent_ui/fluent_ui.dart' as f;
void main() {
/* SWITCH COMMENT BELLOW */
runApp(const AppMaterial());
// runApp(const AppFluent());
}
class AppMaterial extends StatelessWidget {
const AppMaterial({Key? key}) : super(key: key);
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return m.MaterialApp(
title: 'Flutter Demo',
theme: m.ThemeData(
brightness: m.Brightness.dark,
),
home: m.Scaffold(
body: m.ReorderableListView.builder(
itemCount: 10,
itemBuilder: (context, index) => Text('Item $index', key: ValueKey(index)),
onReorder: (int oldIndex, int newIndex) {},
),
),
);
}
}
class AppFluent extends StatelessWidget {
const AppFluent({Key? key}) : super(key: key);
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return f.FluentApp(
title: 'Flutter Demo',
theme: f.ThemeData(
brightness: f.Brightness.dark,
),
home: f.ScaffoldPage(
content: f.ReorderableListView.builder(
itemCount: 10,
itemBuilder: (context, index) => Text('Item $index', key: ValueKey(index)),
onReorder: (int oldIndex, int newIndex) {},
),
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment