Migrate NavigationBar to M3 tokens. (#98285)
This commit is contained in:
@@ -101,16 +101,21 @@ static final String tokenBar = 'bar';
|
||||
test('Templates can get proper shapes from given data', () {
|
||||
const Map<String, dynamic> tokens = <String, dynamic>{
|
||||
'foo.shape': 'shape.large',
|
||||
'bar.shape': 'shape.full',
|
||||
'shape.large': <String, dynamic>{
|
||||
'family': 'SHAPE_FAMILY_ROUNDED_CORNERS',
|
||||
'topLeft': 1.0,
|
||||
'topRight': 2.0,
|
||||
'bottomLeft': 3.0,
|
||||
'bottomRight': 4.0,
|
||||
}
|
||||
},
|
||||
'shape.full': <String, dynamic>{
|
||||
'family': 'SHAPE_FAMILY_CIRCULAR',
|
||||
},
|
||||
};
|
||||
final TestTemplate template = TestTemplate('foobar.dart', tokens);
|
||||
expect(template.shape('foo'), 'const RoundedRectangleBorder(borderRadius: BorderRadius.only(topLeft: Radius.circular(1.0), topRight: Radius.circular(2.0), bottomLeft: Radius.circular(3.0), bottomRight: Radius.circular(4.0)))');
|
||||
expect(template.shape('bar'), 'const StadiumBorder()');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user