reason

clear

import 'package:Parlando/net/dio_utils.dart';
import 'package:Parlando/net/http_api.dart';
import 'package:Parlando/res/constant.dart';
import 'package:Parlando/util/toast_utils.dart';
import 'package:flutter/material.dart';
import 'package:Parlando/membership/membership_router.dart';
import 'package:Parlando/poem/poem_router.dart';
......@@ -31,6 +35,25 @@ class AccountPage extends StatefulWidget {
class _AccountPageState extends State<AccountPage> {
@override
void initState() {
super.initState();
//todo MVVM?
Map<String, String> params = <String, String>{
"profile": "1",
};
DioUtils.instance.asyncRequestNetwork(
Method.post,
HttpApi.login,
queryParameters: params,
onSuccess: (data) {},
onError: (code, msg) {
Toast.show(msg.toString());
},
);
}
@override
Widget build(BuildContext context) {
Widget likeButton = Container(
color: ColorPlate.white,
......@@ -248,37 +271,9 @@ class _MembershipButton extends StatelessWidget {
}
}
class _UserRightButton extends StatelessWidget {
const _UserRightButton({
Key? key,
required this.title,
}) : super(key: key);
final String title;
@override
Widget build(BuildContext context) {
return Container(
padding: EdgeInsets.symmetric(
vertical: 3.px,
horizontal: 12.px,
),
margin: EdgeInsets.all(8.px),
alignment: Alignment.center,
child: Text(
title,
style: const TextStyle(color: ColorPlate.orange),
),
decoration: BoxDecoration(
border: Border.all(color: ColorPlate.orange),
borderRadius: BorderRadius.circular(4.px),
),
);
}
}
class _UserTag extends StatelessWidget {
final String? tag;
const _UserTag({
Key? key,
this.tag,
......@@ -403,12 +398,12 @@ class _PointSelectTextButton extends StatelessWidget {
final bool isSelect;
final String title;
final Function? onTap;
const _PointSelectTextButton(
this.isSelect,
this.title, {
Key? key,
this.onTap,
}) : super(key: key);
const _PointSelectTextButton(this.isSelect,
this.title, {
Key? key,
this.onTap,
}) : super(key: key);
@override
Widget build(BuildContext context) {
......@@ -418,13 +413,13 @@ class _PointSelectTextButton extends StatelessWidget {
children: <Widget>[
isSelect
? Container(
width: 6.px,
height: 6.px,
decoration: BoxDecoration(
color: ColorPlate.orange,
borderRadius: BorderRadius.circular(3),
),
)
width: 6.px,
height: 6.px,
decoration: BoxDecoration(
color: ColorPlate.orange,
borderRadius: BorderRadius.circular(3),
),
)
: Container(),
Container(
padding: const EdgeInsets.only(left: 2),
......@@ -443,12 +438,11 @@ class TextGroup extends StatelessWidget {
final String title, tag;
final Color? color;
const TextGroup(
this.title,
this.tag, {
Key? key,
this.color,
}) : super(key: key);
const TextGroup(this.title,
this.tag, {
Key? key,
this.color,
}) : super(key: key);
@override
Widget build(BuildContext context) {
......
......@@ -126,7 +126,6 @@ class _LoginPageState extends State<LoginPage>
}
void _login() {
setState(() {});
_isLoading = true;
setState(() {});
Map<String, String> params = <String, String>{
......
This diff is collapsed. Click to expand it.