mirror of
https://github.com/flutter/samples.git
synced 2025-11-10 14:58:34 +00:00
Improve color display in M3 Demo (#2438)
- Added the color scheme schematic from Material Theme Builder aligning how colors are displayed here and in documentation across Android and Figma. - On desktop, individual colors can be copied to the clipboard - View adapts from the existing single column view to the new schematic at 500dp width. ### Before: <img width="1727" alt="Screenshot 2024-09-12 at 2 40 15 PM" src="https://github.com/user-attachments/assets/37423d79-174a-4691-b0e1-8f18c947550a"> ### After:   ## Pre-launch Checklist - [x] I read the [Flutter Style Guide] _recently_, and have followed its advice. - [x] I signed the [CLA]. - [x] I read the [Contributors Guide]. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-devrel channel on [Discord]. <!-- Links --> [Flutter Style Guide]: https://github.com/flutter/flutter/blob/master/docs/contributing/Style-guide-for-Flutter-repo.md [CLA]: https://cla.developers.google.com/ [Discord]: https://github.com/flutter/flutter/blob/master/docs/contributing/Chat.md [Contributors Guide]: https://github.com/flutter/samples/blob/main/CONTRIBUTING.md --------- Co-authored-by: Eric Windmill <ewindmill@google.com>
This commit is contained in:
@@ -6,6 +6,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:material_3_demo/color_palettes_screen.dart';
|
||||
import 'package:material_3_demo/main.dart';
|
||||
import 'package:material_3_demo/scheme.dart';
|
||||
|
||||
import 'component_screen_test.dart';
|
||||
|
||||
@@ -69,6 +70,6 @@ void main() {
|
||||
));
|
||||
expect(find.text('Light ColorScheme'), findsOneWidget);
|
||||
expect(find.text('Dark ColorScheme'), findsOneWidget);
|
||||
expect(find.byType(ColorGroup, skipOffstage: false), findsNWidgets(18));
|
||||
expect(find.byType(SchemePreview, skipOffstage: false), findsNWidgets(2));
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user