Skip to content

Commit

Permalink
release: 1.0.12
Browse files Browse the repository at this point in the history
  • Loading branch information
kuloud committed Aug 26, 2024
1 parent 43ecfb8 commit 0a6e9c7
Show file tree
Hide file tree
Showing 36 changed files with 172 additions and 172 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ jobs:
tag_name: v${{ steps.package_publisher.outputs.localVersion }}
title: Release ${{ steps.package_publisher.outputs.localVersion }}
body: |
Automated release for version ${{ steps.package_publisher.outputs.localVersion }}
Changes in this release:
Automated release for version ${{ steps.package_publisher.outputs.localVersion }}\n
Changes in this release:\n
${{ env.git_log }}
draft: false
prerelease: false
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.0.12
2024-08-26
* code lint

## 1.0.11
2024-08-25
* 升级amap iOS sdk版本 10.0.900 | 2024-08-23
Expand Down
12 changes: 3 additions & 9 deletions example/lib/category_list_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ class _CategoryHeader extends StatelessWidget {
margin: margin,
child: Material(
shape: RoundedRectangleBorder(borderRadius: borderRadius),
color: colorScheme.onBackground,
clipBehavior: Clip.antiAlias,
child: SizedBox(
width: MediaQuery.of(context).size.width,
Expand All @@ -198,10 +197,7 @@ class _CategoryHeader extends StatelessWidget {
padding: const EdgeInsetsDirectional.only(start: 8),
child: Text(
category.toDisplayTitle(),
style:
Theme.of(context).textTheme.headlineMedium!.apply(
color: colorScheme.onSurface,
),
style: Theme.of(context).textTheme.headlineMedium,
),
),
],
Expand Down Expand Up @@ -268,7 +264,6 @@ class CategoryDemoItem extends StatelessWidget {
return Material(
// Makes integration tests possible.
key: ValueKey(demo.describe),
color: Theme.of(context).colorScheme.surface,
child: MergeSemantics(
child: InkWell(
onTap: () {
Expand All @@ -292,8 +287,7 @@ class CategoryDemoItem extends StatelessWidget {
children: [
Text(
demo.title,
style: textTheme.titleMedium!
.apply(color: colorScheme.onSurface),
style: textTheme.titleMedium,
),
Text(
demo.subtitle,
Expand All @@ -305,7 +299,7 @@ class CategoryDemoItem extends StatelessWidget {
Divider(
thickness: 1,
height: 1,
color: Theme.of(context).colorScheme.background,
color: Theme.of(context).colorScheme.surface,
),
],
),
Expand Down
2 changes: 0 additions & 2 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import 'package:amap_map_example/category_list_item.dart';
import 'package:amap_map_example/const_config.dart';
import 'package:amap_map_example/data/demos.dart';
import 'package:amap_map_example/routes.dart';
import 'package:amap_map_example/theme.dart';
import 'package:flutter/material.dart';
import 'package:permission_handler/permission_handler.dart';

Expand Down Expand Up @@ -95,7 +94,6 @@ class _AMapDemoState extends State<AMapDemo>

void main() {
runApp(MaterialApp(
theme: ThemeData(colorScheme: DemoThemeData.lightColorScheme),
themeMode: ThemeMode.light,
onGenerateRoute: RouteConfig.onGenerateRoute,
home: AMapDemo()));
Expand Down
8 changes: 4 additions & 4 deletions example/lib/pages/interactive/map_gestures_options.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import 'package:amap_map_example/widgets/amap_switch_button.dart';
import 'package:flutter/material.dart';

class GesturesDemoPage extends StatefulWidget {
GesturesDemoPage({Key? key}) : super(key: key);
GesturesDemoPage({super.key});

@override
_BodyState createState() => _BodyState();
State<GesturesDemoPage> createState() => _BodyState();
}

class _BodyState extends State<GesturesDemoPage> {
Expand Down Expand Up @@ -71,7 +71,7 @@ class _BodyState extends State<GesturesDemoPage> {
},
),
];
Widget _gesturesOptiosWeidget() {
Widget gesturesOptiosWeidget() {
return Container(
padding: EdgeInsets.all(5),
child: Column(
Expand Down Expand Up @@ -103,7 +103,7 @@ class _BodyState extends State<GesturesDemoPage> {
Expanded(
child: SingleChildScrollView(
child: Container(
child: _gesturesOptiosWeidget(),
child: gesturesOptiosWeidget(),
),
),
),
Expand Down
12 changes: 6 additions & 6 deletions example/lib/pages/interactive/map_ui_options.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import 'package:flutter/material.dart';
import 'package:x_amap_base/x_amap_base.dart';

class MapUIDemoPage extends StatefulWidget {
MapUIDemoPage({Key? key}) : super(key: key);
MapUIDemoPage({super.key});

@override
_BodyState createState() => _BodyState();
State<MapUIDemoPage> createState() => _BodyState();
}

class _BodyState extends State<MapUIDemoPage> {
Expand Down Expand Up @@ -52,7 +52,7 @@ class _BodyState extends State<MapUIDemoPage> {
);

//ui控制
final List<Widget> _uiOptions = [
final List<Widget> uiOptions = [
AMapSwitchButton(
label: Text('显示路况'),
defaultValue: _trafficEnabled,
Expand Down Expand Up @@ -100,7 +100,7 @@ class _BodyState extends State<MapUIDemoPage> {
),
];

Widget _uiOptionsWidget() {
Widget uiOptionsWidget() {
return Container(
padding: EdgeInsets.all(5),
child: Column(
Expand All @@ -110,7 +110,7 @@ class _BodyState extends State<MapUIDemoPage> {
Text('UI操作', style: TextStyle(fontWeight: FontWeight.w600)),
Container(
padding: EdgeInsets.only(left: 10),
child: AMapGradView(childrenWidgets: _uiOptions),
child: AMapGradView(childrenWidgets: uiOptions),
),
AMapRadioGroup<LogoPosition?>(
groupLabel: 'Logo位置',
Expand Down Expand Up @@ -169,7 +169,7 @@ class _BodyState extends State<MapUIDemoPage> {
Expanded(
child: SingleChildScrollView(
child: Container(
child: _uiOptionsWidget(),
child: uiOptionsWidget(),
),
),
),
Expand Down
22 changes: 11 additions & 11 deletions example/lib/pages/interactive/move_camera_demo.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import 'package:amap_map_example/widgets/amap_gridview.dart';
import 'package:flutter/material.dart';

class MoveCameraDemoPage extends StatefulWidget {
MoveCameraDemoPage({Key? key}) : super(key: key);
MoveCameraDemoPage({super.key});

@override
_BodyState createState() => _BodyState();
State<MoveCameraDemoPage> createState() => _BodyState();
}

class _BodyState extends State<MoveCameraDemoPage> {
Expand All @@ -20,14 +20,14 @@ class _BodyState extends State<MoveCameraDemoPage> {
onCameraMove: _onCameraMove,
onCameraMoveEnd: _onCameraMoveEnd,
);
List<Widget> _optionsWidget = [
List<Widget> optionsWidget = [
_createMyFloatButton('改变显示区域', _changeLatLngBounds),
_createMyFloatButton('改变中心点', _changeCameraPosition),
_createMyFloatButton('改变缩放级别到18', _changeCameraZoom),
_createMyFloatButton('按照像素移动地图', _scrollBy),
];

Widget _cameraOptions() {
Widget cameraOptions() {
return Container(
padding: EdgeInsets.all(5),
child: Column(
Expand All @@ -36,7 +36,7 @@ class _BodyState extends State<MoveCameraDemoPage> {
children: [
Container(
child: AMapGradView(
childrenWidgets: _optionsWidget,
childrenWidgets: optionsWidget,
),
),
],
Expand Down Expand Up @@ -112,7 +112,7 @@ class _BodyState extends State<MoveCameraDemoPage> {
)
: SizedBox(),
Container(
child: _cameraOptions(),
child: cameraOptions(),
),
],
),
Expand Down Expand Up @@ -204,16 +204,16 @@ class _BodyState extends State<MoveCameraDemoPage> {
return TextButton(
onPressed: onPressed,
style: ButtonStyle(
shape: MaterialStateProperty.all(
shape: WidgetStateProperty.all(
RoundedRectangleBorder(borderRadius: BorderRadius.circular(10))),
//文字颜色
foregroundColor: MaterialStateProperty.all(Colors.white),
foregroundColor: WidgetStateProperty.all(Colors.white),
//水波纹颜色
overlayColor: MaterialStateProperty.all(Colors.blueAccent),
overlayColor: WidgetStateProperty.all(Colors.blueAccent),
//背景颜色
backgroundColor: MaterialStateProperty.resolveWith((states) {
backgroundColor: WidgetStateProperty.resolveWith((states) {
//设置按下时的背景颜色
if (states.contains(MaterialState.pressed)) {
if (states.contains(WidgetState.pressed)) {
return Colors.blueAccent;
}
//默认背景颜色
Expand Down
4 changes: 2 additions & 2 deletions example/lib/pages/interactive/poi_click_demo.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import 'package:x_amap_base/x_amap_base.dart';
import 'package:flutter/material.dart';

class PoiClickDemoPage extends StatefulWidget {
PoiClickDemoPage({Key? key}) : super(key: key);
PoiClickDemoPage({super.key});

@override
_BodyState createState() => _BodyState();
State<PoiClickDemoPage> createState() => _BodyState();
}

class _BodyState extends State<PoiClickDemoPage> {
Expand Down
10 changes: 5 additions & 5 deletions example/lib/pages/interactive/snapshot_demo.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@ class _SnapShotState extends State<SnapshotPage> {
child: TextButton(
child: Text('截屏'),
style: ButtonStyle(
shape: MaterialStateProperty.all(RoundedRectangleBorder(
shape: WidgetStateProperty.all(RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10))),
//文字颜色
foregroundColor: MaterialStateProperty.all(Colors.white),
foregroundColor: WidgetStateProperty.all(Colors.white),
//水波纹颜色
overlayColor: MaterialStateProperty.all(Colors.blueAccent),
overlayColor: WidgetStateProperty.all(Colors.blueAccent),
//背景颜色
backgroundColor: MaterialStateProperty.resolveWith((states) {
backgroundColor: WidgetStateProperty.resolveWith((states) {
//设置按下时的背景颜色
if (states.contains(MaterialState.pressed)) {
if (states.contains(WidgetState.pressed)) {
return Colors.blueAccent;
}
//默认背景颜色
Expand Down
4 changes: 2 additions & 2 deletions example/lib/pages/map/change_map_lang.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import 'package:amap_map_example/widgets/amap_radio_group.dart';
import 'package:flutter/material.dart';

class ChangeMapLangPage extends StatefulWidget {
ChangeMapLangPage({Key? key}) : super(key: key);
ChangeMapLangPage({super.key});

@override
_PageBodyState createState() => _PageBodyState();
State<ChangeMapLangPage> createState() => _PageBodyState();
}

class _PageBodyState extends State<ChangeMapLangPage> {
Expand Down
4 changes: 2 additions & 2 deletions example/lib/pages/map/change_map_type.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import 'package:amap_map_example/widgets/amap_radio_group.dart';
import 'package:flutter/material.dart';

class ChangeMapTypePage extends StatefulWidget {
ChangeMapTypePage({Key? key}) : super(key: key);
ChangeMapTypePage({super.key});

@override
_PageBodyState createState() => _PageBodyState();
State<ChangeMapTypePage> createState() => _PageBodyState();
}

class _PageBodyState extends State<ChangeMapTypePage> {
Expand Down
6 changes: 3 additions & 3 deletions example/lib/pages/map/custom_map_style.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

class CustomMapStylePage extends StatefulWidget {
CustomMapStylePage({Key? key}) : super(key: key);
CustomMapStylePage({super.key});

@override
_CustomMapStyleState createState() => _CustomMapStyleState();
State<CustomMapStylePage> createState() => _CustomMapStyleState();
}

class _CustomMapStyleState extends State<CustomMapStylePage> {
bool _mapCreated = false;

CustomStyleOptions _customStyleOptions = CustomStyleOptions(false);
final CustomStyleOptions _customStyleOptions = CustomStyleOptions(false);
//加载自定义地图样式
void _loadCustomData() async {
ByteData styleByteData = await rootBundle.load('assets/style.data');
Expand Down
4 changes: 2 additions & 2 deletions example/lib/pages/map/limit_map_bounds.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import 'package:x_amap_base/x_amap_base.dart';
import 'package:flutter/material.dart';

class LimitMapBoundsPage extends StatefulWidget {
LimitMapBoundsPage({Key? key}) : super(key: key);
LimitMapBoundsPage({super.key});

@override
_BodyState createState() => _BodyState();
State<LimitMapBoundsPage> createState() => _BodyState();
}

class _BodyState extends State<LimitMapBoundsPage> {
Expand Down
Loading

0 comments on commit 0a6e9c7

Please sign in to comment.