mirror of
https://github.com/alibaba/flutter-go.git
synced 2025-07-15 03:04:25 +08:00
Add:创建 flutter go web 版
This commit is contained in:
37
packages/flutter_web/test/widgets/test_border.dart
Normal file
37
packages/flutter_web/test/widgets/test_border.dart
Normal file
@ -0,0 +1,37 @@
|
||||
// Copyright 2016 The Chromium Authors. 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_web/material.dart';
|
||||
|
||||
typedef Logger = void Function(String caller);
|
||||
|
||||
class TestBorder extends ShapeBorder {
|
||||
const TestBorder(this.onLog) : assert(onLog != null);
|
||||
|
||||
final Logger onLog;
|
||||
|
||||
@override
|
||||
EdgeInsetsGeometry get dimensions =>
|
||||
const EdgeInsetsDirectional.only(start: 1.0);
|
||||
|
||||
@override
|
||||
ShapeBorder scale(double t) => TestBorder(onLog);
|
||||
|
||||
@override
|
||||
Path getInnerPath(Rect rect, {TextDirection textDirection}) {
|
||||
onLog('getInnerPath $rect $textDirection');
|
||||
return Path();
|
||||
}
|
||||
|
||||
@override
|
||||
Path getOuterPath(Rect rect, {TextDirection textDirection}) {
|
||||
onLog('getOuterPath $rect $textDirection');
|
||||
return Path();
|
||||
}
|
||||
|
||||
@override
|
||||
void paint(Canvas canvas, Rect rect, {TextDirection textDirection}) {
|
||||
onLog('paint $rect $textDirection');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user