Compare commits

..

No commits in common. 'b208dfd21f1c283acfec5a6be2858a79643ccce4' and 'ebd663f782cfc10499186234659cc0088cd1e60c' have entirely different histories.

@ -17,7 +17,7 @@ class MyApp extends StatelessWidget {
return MaterialApp(
title: 'PowerLogger\nDemo',
home: MyHomePage(title: 'PowerLogger Demo'),
theme: ThemeData.dark(),
//theme: ThemeData.dark(),
);
}
}

@ -5,121 +5,121 @@ packages:
dependency: transitive
description:
name: async
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.7.0"
version: "2.6.1"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.0"
characters:
dependency: transitive
description:
name: characters
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.0"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.3.1"
version: "1.2.0"
clock:
dependency: transitive
description:
name: clock
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.0"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.15.0"
cupertino_icons:
dependency: "direct main"
description:
name: cupertino_icons
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.3"
version: "1.0.2"
device_info_plus:
dependency: transitive
description:
name: device_info_plus
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.0"
version: "2.0.1"
device_info_plus_linux:
dependency: transitive
description:
name: device_info_plus_linux
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.0"
version: "2.0.0"
device_info_plus_macos:
dependency: transitive
description:
name: device_info_plus_macos
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.0"
version: "2.0.0"
device_info_plus_platform_interface:
dependency: transitive
description:
name: device_info_plus_platform_interface
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.0"
version: "2.0.0"
device_info_plus_web:
dependency: transitive
description:
name: device_info_plus_web
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.0"
version: "2.0.0"
device_info_plus_windows:
dependency: transitive
description:
name: device_info_plus_windows
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.0"
version: "2.0.0"
dio:
dependency: "direct main"
description:
name: dio
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "4.0.0"
fake_async:
dependency: transitive
description:
name: fake_async
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.2.0"
ffi:
dependency: transitive
description:
name: ffi
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.2"
version: "1.0.0"
file:
dependency: transitive
description:
name: file
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "6.1.2"
version: "6.1.0"
flutter:
dependency: "direct main"
description: flutter
@ -129,7 +129,7 @@ packages:
dependency: transitive
description:
name: flutter_highlight
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.7.0"
flutter_test:
@ -146,121 +146,121 @@ packages:
dependency: "direct main"
description:
name: get
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "4.3.8"
version: "4.1.4"
highlight:
dependency: transitive
description:
name: highlight
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.7.0"
http:
dependency: transitive
description:
name: http
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.13.3"
version: "0.13.1"
http_parser:
dependency: transitive
description:
name: http_parser
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "4.0.0"
js:
dependency: transitive
description:
name: js
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.6.3"
logger:
dependency: transitive
description:
name: logger
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.0"
version: "1.0.0"
matcher:
dependency: transitive
description:
name: matcher
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.12.10"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.4.0"
version: "1.3.0"
package_info_plus:
dependency: transitive
description:
name: package_info_plus
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.6"
version: "1.0.3"
package_info_plus_linux:
dependency: transitive
description:
name: package_info_plus_linux
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.3"
version: "1.0.0"
package_info_plus_macos:
dependency: transitive
description:
name: package_info_plus_macos
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.1"
version: "1.1.0"
package_info_plus_platform_interface:
dependency: transitive
description:
name: package_info_plus_platform_interface
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.2"
version: "1.0.0"
package_info_plus_web:
dependency: transitive
description:
name: package_info_plus_web
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.4"
version: "1.0.2"
package_info_plus_windows:
dependency: transitive
description:
name: package_info_plus_windows
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.3"
version: "1.0.0"
path:
dependency: transitive
description:
name: path
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.8.0"
pedantic:
dependency: transitive
description:
name: pedantic
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.11.1"
version: "1.11.0"
plugin_platform_interface:
dependency: transitive
description:
name: plugin_platform_interface
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.1"
version: "2.0.0"
power_logger:
dependency: "direct main"
description:
@ -277,65 +277,65 @@ packages:
dependency: transitive
description:
name: source_span
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.8.1"
stack_trace:
dependency: transitive
description:
name: stack_trace
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.10.0"
stream_channel:
dependency: transitive
description:
name: stream_channel
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.0"
string_scanner:
dependency: transitive
description:
name: string_scanner
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.0"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.2.0"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.4.1"
version: "0.3.0"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.3.0"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.0"
win32:
dependency: transitive
description:
name: win32
url: "https://pub.dartlang.org"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.2.9"
version: "2.0.5"
sdks:
dart: ">=2.13.0 <3.0.0"
dart: ">=2.12.0 <3.0.0"
flutter: ">=1.20.0"

@ -6,7 +6,6 @@ import 'package:power_logger/src/view/dio_error_view.dart';
class DioErrorBuilder extends StatelessWidget {
final DioError data;
final DateTime date;
DioErrorBuilder({Key? key, required this.data, required this.date})
: super(key: key);
@ -22,14 +21,14 @@ class DioErrorBuilder extends StatelessWidget {
),
);
},
title: Text(data.requestOptions.path),
subtitle: Text('${data.message}\n$date'),
title: Text(data.requestOptions.path,style: TextStyle(fontSize: 16,color: Color(0xFF333333)),),
subtitle: Text('${data.message}\n$date',style: TextStyle(fontSize: 14,color: Color(0xFF666666)),),
trailing: Row(
mainAxisSize: MainAxisSize.min,
children: [
Chip(
backgroundColor: Colors.blue.withOpacity(0.4),
label: Text(data.requestOptions.method),
label: Text(data.requestOptions.method,style: TextStyle(fontSize: 14,color: Colors.black),),
),
],
),

@ -18,14 +18,14 @@ class DioResponseBuilder extends StatelessWidget {
builder: (context) => DioResponseView(data: data),
),
),
title: Text(data.requestOptions.path),
subtitle: Text(date.toString()),
title: Text(data.requestOptions.path,style: TextStyle(fontSize: 16,color: Color(0xFF333333)),),
subtitle: Text(date.toString(),style: TextStyle(fontSize: 14,color: Color(0xFF666666)),),
trailing: Row(
mainAxisSize: MainAxisSize.min,
children: [
Chip(
backgroundColor: Colors.blue.withOpacity(0.8),
label: Text(data.requestOptions.method),
label: Text(data.requestOptions.method,style: TextStyle(fontSize: 14,color: Colors.black),),
),
],
),

@ -9,8 +9,8 @@ class FlutterErrorBuilder extends StatelessWidget {
Widget build(BuildContext context) {
return ListTile(
tileColor: Colors.red.withOpacity(0.4),
title: Text(details.exception.toString()),
trailing: Chip(label: Text('EXCEPTION'), backgroundColor: Colors.red),
title: Text(details.exception.toString(),style: TextStyle(fontSize: 14,color: Colors.black),),
trailing: Chip(label: Text('EXCEPTION',style: TextStyle(fontSize: 14,color: Colors.black),), backgroundColor: Colors.red),
onTap: () {
Navigator.push(
context,

@ -1,39 +1,32 @@
import 'package:flutter/material.dart';
import 'package:power_logger/src/theme/custom_theme.dart';
/// UnfocusParser
class UnfocusParser extends StatelessWidget {
final dynamic data;
final String? tag;
const UnfocusParser({Key? key, required this.data, this.tag})
: super(key: key);
@override
Widget build(BuildContext context) {
return Material(
color: Theme.of(context).brightness == Brightness.light
? Colors.black12
: Colors.white10,
color: Colors.white10,
child: ListTile(
onTap: () => Navigator.push(
context,
MaterialPageRoute(
builder: (context) => Theme(
data: CustomTheme.instance.customTheme ?? Theme.of(context),
child: Scaffold(
appBar: AppBar(title: Text(data.runtimeType.toString())),
body: Text(data.toString()),
),
builder: (context) => Scaffold(
appBar: AppBar(title: Text(data.runtimeType.toString())),
body: Text(data.toString(),style: TextStyle(fontSize: 16,color: Colors.black),),
),
),
),
title: Text(
data.toString(),
maxLines: 1,
maxLines: 1, style: TextStyle(fontSize: 16,color: Colors.black),
),
trailing: Chip(
label: Text(tag ?? data.runtimeType.toString()),
label: Text(tag ?? data.runtimeType.toString(),style: TextStyle(fontSize: 16,color: Colors.black),),
),
),
);

@ -1,6 +1,5 @@
import 'package:flutter/material.dart';
import 'package:power_logger/power_logger.dart';
import 'package:power_logger/src/theme/custom_theme.dart';
import 'package:power_logger/src/views/info_view.dart';
import 'package:power_logger/src/views/logger_view.dart';
import 'package:power_logger/src/views/settings_view.dart';
@ -17,67 +16,67 @@ class _PowerLoggerViewState extends State<PowerLoggerView> {
PageController _pageController = PageController();
int _currentIndex = 0;
void Function(void Function())? _setState;
@override
Widget build(BuildContext context) {
return Theme(
data: CustomTheme.instance.customTheme ?? Theme.of(context),
child: Scaffold(
appBar: AppBar(
title: Text('Logger View'),
actions: [
IconButton(
icon: Icon(Icons.clear_all_rounded),
onPressed: () {
LoggerData.clear();
setState(() {});
},
),
],
),
body: PageView(
controller: _pageController,
onPageChanged: (index) {
_currentIndex = index;
if (_setState != null) _setState!(() {});
},
children: [
LoggerView(),
InfoView(),
SettingsView(
stateRefresh: () => setState(() {}),
),
],
),
bottomNavigationBar: StatefulBuilder(
builder: (context, kSetState) {
_setState = kSetState;
return BottomNavigationBar(
currentIndex: _currentIndex,
onTap: (index) {
_currentIndex = index;
kSetState(() {});
_pageController.animateToPage(
index,
duration: Duration(milliseconds: 300),
curve: Curves.easeInOutCubic,
);
},
items: [
BottomNavigationBarItem(
icon: Icon(Icons.assessment), label: 'Log'),
BottomNavigationBarItem(
icon: Icon(Icons.perm_device_information),
label: 'Info',
),
BottomNavigationBarItem(
icon: Icon(Icons.settings),
label: 'Settings',
),
],
);
},
),
return Scaffold(
appBar: AppBar(
title: Text('Logger View'),
backgroundColor: Colors.blue,
actions: [
IconButton(
icon: Icon(Icons.clear_all_rounded),
onPressed: () {
LoggerData.clear();
setState(() {});
},
),
],
),
body: PageView(
controller: _pageController,
onPageChanged: (index) {
_currentIndex = index;
if (_setState != null) _setState!(() {});
},
children: [
LoggerView(),
InfoView(),
SettingsView(),
],
),
bottomNavigationBar: StatefulBuilder(
builder: (context, kSetState) {
_setState = kSetState;
return BottomNavigationBar(
backgroundColor: Colors.white,
currentIndex: _currentIndex,
selectedLabelStyle: TextStyle(fontSize: 14),
selectedItemColor: Colors.blue,
unselectedItemColor: Color(0xFF666666),
unselectedLabelStyle: TextStyle(fontSize: 12),
onTap: (index) {
_currentIndex = index;
kSetState(() {});
_pageController.animateToPage(
index,
duration: Duration(milliseconds: 300),
curve: Curves.easeInOutCubic,
);
},
items: [
BottomNavigationBarItem(
icon: Icon(Icons.assessment,color: Color(0xFF666666),),activeIcon: Icon(Icons.assessment,color: Colors.blue,), label: '日志'),
BottomNavigationBarItem(
icon: Icon(Icons.perm_device_information,color: Color(0xFF666666),),activeIcon: Icon(Icons.perm_device_information,color: Colors.blue,),
label: '信息',
),
BottomNavigationBarItem(
icon: Icon(Icons.settings,color: Color(0xFF666666),),activeIcon: Icon(Icons.settings,color: Colors.blue,),
label: '设置',
),
],
);
},
),
);
}

@ -1,24 +0,0 @@
import 'package:flutter/material.dart';
class CustomTheme {
factory CustomTheme() => _instance;
static CustomTheme get instance => _instance;
static late CustomTheme _instance = CustomTheme._();
CustomTheme._() {
follow = true;
}
ThemeData? customTheme;
late bool follow;
void setThemeData(bool state) {
follow = state;
if (follow) {
customTheme = null;
} else {
customTheme = ThemeData.light();
}
}
}

@ -21,12 +21,12 @@ class BoxView extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
DefaultTextStyle(
style: Theme.of(context).textTheme.caption!,
style: TextStyle(fontSize: 16,color: Colors.red),
child: title,
),
child == null ? SizedBox() : SizedBox(height: 10),
DefaultTextStyle(
style: Theme.of(context).textTheme.bodyText2!,
style: TextStyle(fontSize: 15,color: Color(0xFF333333)),
child: child ?? SizedBox(),
),
children == null ? SizedBox() : SizedBox(height: 10),

@ -1,7 +1,6 @@
import 'package:dio/dio.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:power_logger/src/theme/custom_theme.dart';
import 'package:power_logger/src/view/box_view.dart';
import 'package:power_logger/src/view/table_view.dart';
import 'package:power_logger/src/view/title_view.dart';
@ -67,36 +66,33 @@ class _DioErrorViewState extends State<DioErrorView> {
@override
Widget build(BuildContext context) {
return Theme(
data: CustomTheme.instance.customTheme ?? Theme.of(context),
child: Scaffold(
appBar: AppBar(
backgroundColor: Theme.of(context).brightness == Brightness.light
? Colors.red[100]
: Colors.red[900],
title: Text(widget.data.requestOptions.path),
actions: [
Chip(
label: Text(widget.data.requestOptions.method),
backgroundColor: Colors.lightGreen.withOpacity(0.5),
),
SizedBox(width: 8),
],
),
body: ListView(
padding: EdgeInsets.symmetric(vertical: 20),
children: [
TitleView(title: Text('Request')),
_buildBaseURL(),
_buildPath(),
_buildMessage(),
_buildMap(_request.headers),
_buildMap(_request.queryParameters),
_buildMap(_request.data),
TitleView(title: Text('Response')),
_buildStatus(),
],
),
return Scaffold(
appBar: AppBar(
backgroundColor: Theme.of(context).brightness == Brightness.light
? Colors.red[100]
: Colors.red[900],
title: Text(widget.data.requestOptions.path),
actions: [
Chip(
label: Text(widget.data.requestOptions.method),
backgroundColor: Colors.lightGreen.withOpacity(0.5),
),
SizedBox(width: 8),
],
),
body: ListView(
padding: EdgeInsets.symmetric(vertical: 20),
children: [
TitleView(title: Text('Request')),
_buildBaseURL(),
_buildPath(),
_buildMessage(),
_buildMap(_request.headers),
_buildMap(_request.queryParameters),
_buildMap(_request.data),
TitleView(title: Text('Response')),
_buildStatus(),
],
),
);
}

@ -7,7 +7,6 @@ import 'package:flutter_highlight/themes/atom-one-dark.dart';
import 'package:flutter_highlight/themes/atom-one-light.dart';
import 'package:power_logger/external_lib/pretty_json.dart';
import 'package:power_logger/src/parser/dio_parser/dio_parser.dart';
import 'package:power_logger/src/theme/custom_theme.dart';
import 'package:power_logger/src/view/box_view.dart';
import 'package:power_logger/src/view/table_view.dart';
import 'package:power_logger/src/view/title_view.dart';
@ -80,9 +79,8 @@ class _DioResponseViewState extends State<DioResponseView> {
child: HighlightView(
widget.data!.data,
language: _dioParser.highlight,
theme: Theme.of(context).brightness == Brightness.light
? atomOneLightTheme
: atomOneDarkTheme,
theme: atomOneLightTheme
,
),
);
case ContentType.JSON:
@ -151,50 +149,47 @@ class _DioResponseViewState extends State<DioResponseView> {
@override
Widget build(BuildContext context) {
return Theme(
data: CustomTheme.instance.customTheme ?? Theme.of(context),
child: Scaffold(
appBar: AppBar(
backgroundColor: Colors.green[600],
title: Text(widget.data!.requestOptions.path),
actions: [
Chip(
label: Text(widget.data!.requestOptions.method),
backgroundColor: Colors.lightGreen,
),
SizedBox(width: 8),
],
),
body: ListView(
padding: EdgeInsets.symmetric(vertical: 20),
children: [
TitleView(title: Text('Request')),
_buildBaseURL(),
_buildPath(),
_buildMap(_request.headers),
_buildMap(_request.queryParameters),
_buildMap(_request.data),
TitleView(title: Text('Response')),
_buildMap(widget.data!.headers.map),
_buildStatus(),
SwitchListTile(
value: _showRawData,
title: Text('RawData'),
onChanged: (state) => setState(() => _showRawData = state),
),
AnimatedCrossFade(
firstChild: _buildRawData(),
secondChild: _buildData(),
crossFadeState: _showRawData
? CrossFadeState.showFirst
: CrossFadeState.showSecond,
duration: Duration(milliseconds: 500),
firstCurve: Curves.easeInOutCubic,
secondCurve: Curves.easeInOutCubic,
sizeCurve: Curves.easeInOutCubic,
),
],
),
return Scaffold(
appBar: AppBar(
backgroundColor: Colors.green[600],
title: Text(widget.data!.requestOptions.path),
actions: [
Chip(
label: Text(widget.data!.requestOptions.method),
backgroundColor: Colors.lightGreen,
),
SizedBox(width: 8),
],
),
body: ListView(
padding: EdgeInsets.symmetric(vertical: 20),
children: [
TitleView(title: Text('Request')),
_buildBaseURL(),
_buildPath(),
_buildMap(_request.headers),
_buildMap(_request.queryParameters),
_buildMap(_request.data),
TitleView(title: Text('Response')),
_buildMap(widget.data!.headers.map),
_buildStatus(),
SwitchListTile(
value: _showRawData,
title: Text('RawData'),
onChanged: (state) => setState(() => _showRawData = state),
),
AnimatedCrossFade(
firstChild: _buildRawData(),
secondChild: _buildData(),
crossFadeState: _showRawData
? CrossFadeState.showFirst
: CrossFadeState.showSecond,
duration: Duration(milliseconds: 500),
firstCurve: Curves.easeInOutCubic,
secondCurve: Curves.easeInOutCubic,
sizeCurve: Curves.easeInOutCubic,
),
],
),
);
}

@ -1,9 +1,7 @@
import 'package:flutter/material.dart';
import 'package:power_logger/src/theme/custom_theme.dart';
class FlutterErrorView extends StatefulWidget {
final FlutterErrorDetails details;
FlutterErrorView({Key? key, required this.details}) : super(key: key);
@override
@ -24,38 +22,35 @@ class _FlutterErrorViewState extends State<FlutterErrorView> {
@override
Widget build(BuildContext context) {
return Theme(
data: CustomTheme.instance.customTheme ?? Theme.of(context),
child: Scaffold(
appBar: AppBar(
title: Text('Flutter Error'),
),
body: Column(
children: [
Card(
margin: EdgeInsets.all(10),
child: Padding(
padding: EdgeInsets.all(10),
child: SelectableText(
exceptionValue,
style: TextStyle(
fontSize: 22,
),
return Scaffold(
appBar: AppBar(
title: Text('Flutter Error'),
),
body: Column(
children: [
Card(
margin: EdgeInsets.all(10),
child: Padding(
padding: EdgeInsets.all(10),
child: SelectableText(
exceptionValue,
style: TextStyle(
fontSize: 22,
),
),
),
Expanded(
child: ListView.separated(
padding: EdgeInsets.all(10),
itemBuilder: (context, index) {
return Text(_stringList[index]);
},
separatorBuilder: (context, index) => SizedBox(height: 5),
itemCount: _stringList.length,
),
),
Expanded(
child: ListView.separated(
padding: EdgeInsets.all(10),
itemBuilder: (context, index) {
return Text(_stringList[index]);
},
separatorBuilder: (context, index) => SizedBox(height: 5),
itemCount: _stringList.length,
),
],
),
),
],
),
);
}

@ -9,7 +9,7 @@ class TitleView extends StatelessWidget {
return Padding(
padding: EdgeInsets.symmetric(horizontal: 5, vertical: 10),
child: DefaultTextStyle(
style: Theme.of(context).textTheme.headline4!,
style: TextStyle(fontSize: 26,color: Color(0xFF666666)),
child: title,
),
);

@ -71,8 +71,8 @@ class _InfoViewState extends State<InfoView>
SliverList(
delegate: SliverChildListDelegate([
ListTile(
title: Text('Package Info'),
tileColor: Theme.of(context).accentColor.withOpacity(0.2),
title: Text('Package Info',style: TextStyle(fontSize: 18,color: Color(0xff333333))),
tileColor: Colors.blue.withOpacity(0.2),
),
InfoTile(title: 'appName', subTitle: packageInfo!.appName),
InfoTile(
@ -81,8 +81,8 @@ class _InfoViewState extends State<InfoView>
title: 'packageName', subTitle: packageInfo!.packageName),
InfoTile(title: 'version', subTitle: packageInfo!.version),
ListTile(
title: Text('Device Info'),
tileColor: Theme.of(context).accentColor.withOpacity(0.1),
title: Text('Device Info',style: TextStyle(fontSize: 18,color: Color(0xff333333))),
tileColor: Colors.blue.withOpacity(0.1),
),
])),
_buildView(),

@ -4,7 +4,6 @@ import 'package:power_logger/src/views/platform_specific/info_tile.dart';
class AndroidView extends StatelessWidget {
final AndroidDeviceInfo? androidInfo;
AndroidView({Key? key, required this.androidInfo}) : super(key: key);
@override

@ -15,8 +15,8 @@ class InfoTile extends StatelessWidget {
@override
Widget build(BuildContext context) {
return ListTile(
title: Text(title),
subtitle: Text(subTitle),
title: Text(title,style: TextStyle(fontSize: 14,color: Color(0xff333333)),),
subtitle: Text(subTitle,style: TextStyle(fontSize: 14,color: Color(0xff666666))),
onLongPress: () async {
ScaffoldMessenger.of(context).hideCurrentSnackBar();
Clipboard.setData(ClipboardData(text: subTitle));

@ -1,10 +1,8 @@
import 'package:flutter/material.dart';
import 'package:power_logger/power_logger.dart';
import 'package:power_logger/src/theme/custom_theme.dart';
class SettingsView extends StatefulWidget {
final VoidCallback stateRefresh;
SettingsView({Key? key, required this.stateRefresh}) : super(key: key);
SettingsView({Key? key}) : super(key: key);
@override
_SettingsViewState createState() => _SettingsViewState();
@ -16,7 +14,9 @@ class _SettingsViewState extends State<SettingsView> {
return ListView(
children: [
SwitchListTile(
title: Text('终端日志'),
inactiveThumbColor: Colors.white,
inactiveTrackColor: Color(0xFF999999),
title: Text('终端日志',style: TextStyle(fontSize: 16,color: Colors.black),),
subtitle: Text(''),
value: LoggerData.markLogger,
onChanged: (state) {
@ -24,15 +24,6 @@ class _SettingsViewState extends State<SettingsView> {
setState(() {});
},
),
SwitchListTile(
title: Text(CustomTheme.instance.follow ? '跟随系统' : 'Light'),
subtitle: Text(''),
value: CustomTheme.instance.follow,
onChanged: (state) {
CustomTheme.instance.setThemeData(state);
widget.stateRefresh();
},
),
],
);
}

@ -105,7 +105,7 @@ class _FabButton extends StatelessWidget {
Widget build(BuildContext context) {
return Container(
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.secondary,
color: Colors.blue,
borderRadius: BorderRadius.circular(25),
boxShadow: [
BoxShadow(

Loading…
Cancel
Save