【发布时间】:2020-09-30 06:40:17
【问题描述】:
我正在设计一个简单的屏幕。我想实现这个
如何删除左上边框。我尝试使用边框仅显示一侧边框,但它显示错误无法更改另一个然后统一。我是否删除了应用栏然后堆叠了小部件。请告诉我我做错了什么。 我的代码是
import 'package:flutter/material.dart';
class SendScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
final GlobalKey<ScaffoldState> _scaffoldKey =
new GlobalKey<ScaffoldState>();
return Scaffold(
drawer: Drawer(),
key: _scaffoldKey,
appBar: PreferredSize(
preferredSize: Size.fromHeight(100.0),
child: AppBar(
leading: IconButton(
icon: Icon(Icons.access_alarm),
onPressed: () {
_scaffoldKey.currentState.openDrawer();
}),
actions: [
Container(
width: 50,
decoration: BoxDecoration(
color: const Color(0xff7c94b6),
image: const DecorationImage(
image: NetworkImage(
'https://flutter.github.io/assets-for-api-docs/assets/widgets/owl-2.jpg'),
fit: BoxFit.cover,
),
border: Border.all(
color: Colors.black,
// width: 8,
),
borderRadius: BorderRadius.circular(12),
),
),
SizedBox(
width: 20,
)
],
shape: ContinuousRectangleBorder(
borderRadius: BorderRadius.only(
// bottomLeft: Radius.circular(30),
bottomRight: Radius.circular(80),
),
),
title: Text('Sliver AppBar'),
),
),
body: Column(
children: [
Container(
height: 80,
decoration: BoxDecoration(
border: Border.all(
color: Colors.red[500],
),
borderRadius: BorderRadius.only(
bottomRight: Radius.circular(80),
),
),
child: Row(
children: [],
),
)
],
),
);
}
}
【问题讨论】:
-
我不明白你所说的左上边框是什么意思。你的意思是在左上角也添加一个边框半径?
标签: flutter user-interface flutter-layout