update logger view

master
小赖 4 years ago
parent 0436e0b02d
commit caaf3989a1

@ -42,10 +42,7 @@ class _DioErrorBuilderState extends State<DioErrorBuilder> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
if (widget.data == null) return ListTile(title: Text('NULL Dio Error')); if (widget.data == null) return ListTile(title: Text('NULL Dio Error'));
return Material( return Material(
clipBehavior: Clip.antiAlias,
borderRadius: BorderRadius.circular(5),
color: Colors.red[100], color: Colors.red[100],
elevation: 4,
child: Column( child: Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [

@ -17,9 +17,7 @@ class _DioResponseBuilderState extends State<DioResponseBuilder> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Material( return Material(
clipBehavior: Clip.antiAlias, elevation: 0,
elevation: 4,
borderRadius: BorderRadius.circular(5),
color: Colors.green[100], color: Colors.green[100],
child: ListTile( child: ListTile(
onTap: () => Navigator.push( onTap: () => Navigator.push(

@ -8,13 +8,21 @@ class UnfocusParser extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Material( return Material(
elevation: 4,
color: Colors.white, color: Colors.white,
clipBehavior: Clip.antiAlias,
borderRadius: BorderRadius.circular(5),
child: ListTile( child: ListTile(
onTap: () {}, onTap: () => Navigator.push(
title: Text(data.toString()), context,
MaterialPageRoute(
builder: (context) => Scaffold(
appBar: AppBar(title: Text(data.runtimeType.toString())),
body: Text(data.toString()),
),
),
),
title: Text(
data.toString(),
maxLines: 1,
),
trailing: Chip( trailing: Chip(
label: Text(data.runtimeType.toString()), label: Text(data.runtimeType.toString()),
), ),

@ -12,9 +12,7 @@ class LoggerView extends StatefulWidget {
class _LoggerViewState extends State<LoggerView> { class _LoggerViewState extends State<LoggerView> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return ListView.separated( return ListView.builder(
padding: EdgeInsets.all(5),
separatorBuilder: (_, __) => SizedBox(height: 5),
itemBuilder: (context, index) { itemBuilder: (context, index) {
return LoggerDataParser.builder(LoggerData.data[index]); return LoggerDataParser.builder(LoggerData.data[index]);
}, },

Loading…
Cancel
Save