rustdesk/flutter/lib/desktop/widgets/titlebar_widget.dart

31 lines
790 B
Dart
Raw Normal View History

2022-05-29 19:55:50 +08:00
import 'package:flutter/material.dart';
const sidebarColor = Color(0xFF0C6AF6);
const backgroundStartColor = Color(0xFF0583EA);
const backgroundEndColor = Color(0xFF0697EA);
2022-05-29 19:55:50 +08:00
class DesktopTitleBar extends StatelessWidget {
final Widget? child;
const DesktopTitleBar({Key? key, this.child}) : super(key: key);
@override
Widget build(BuildContext context) {
return Container(
decoration: const BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [backgroundStartColor, backgroundEndColor],
stops: [0.0, 1.0]),
),
child: Row(
children: [
Expanded(
child: child ?? Offstage(),
)
],
2022-05-29 19:55:50 +08:00
),
);
}
}