This repository has been archived by the owner on Jun 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate ThemeData.toggleableActiveColor (#694)
- Loading branch information
Showing
2 changed files
with
79 additions
and
23 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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// Copyright 2019 The Flutter team. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
import 'package:flutter/material.dart'; | ||
import 'package:gallery/themes/material_demo_theme_data.dart'; | ||
import 'package:test/test.dart'; | ||
|
||
void main() { | ||
test('verify former toggleableActiveColor themes are set', () async { | ||
const Color primaryColor = Color(0xFF6200EE); | ||
final ThemeData themeData = MaterialDemoThemeData.themeData; | ||
|
||
expect( | ||
themeData.checkboxTheme.fillColor!.resolve({MaterialState.selected}), | ||
primaryColor, | ||
); | ||
expect( | ||
themeData.radioTheme.fillColor!.resolve({MaterialState.selected}), | ||
primaryColor, | ||
); | ||
expect( | ||
themeData.switchTheme.thumbColor!.resolve({MaterialState.selected}), | ||
primaryColor, | ||
); | ||
expect( | ||
themeData.switchTheme.trackColor!.resolve({MaterialState.selected}), | ||
primaryColor, | ||
); | ||
}); | ||
} |