修复投票文字溢出问题

hmxc
小赖 4 years ago
parent 7522de6181
commit cd84ba5ee3

@ -0,0 +1,7 @@
class AppConfig {
///API Key
static const caiYunAPI = 'YETFbiaWktYHfCQE';
///AppID
static const wechatAppId = 'wxd7bdef0d4849ddb8';
}

@ -1,3 +1,4 @@
import 'package:akuCommunity/constants/config.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
@ -50,6 +51,7 @@ void main() async {
jpush.applyPushAuthority(
new NotificationSettingsIOS(sound: true, alert: true, badge: true));
DeveloperUtil.setDev(true);
registerWxApi(appId: AppConfig.wechatAppId);
runApp(MyApp());
}
@ -61,12 +63,6 @@ class MyApp extends StatefulWidget {
}
class _MyAppState extends State<MyApp> {
@override
void initState() {
super.initState();
registerWxApi(appId: 'wxd7bdef0d4849ddb8');
}
@override
Widget build(BuildContext context) {
return MultiProvider(

@ -151,19 +151,15 @@ class _VotingDetailPageState extends State<VotingDetailPage> {
finishVoted
? Row(
children: [
SizedBox(
width: 290.w,
child: LinearProgressIndicator(
value: _percent,
),
),
LinearProgressIndicator(
value: _percent * 0.01,
).expand(),
8.w.widthBox,
'${_percent.toStringAsFixed(2)}%'
.text
.color(ktextSubColor)
.size(24.sp)
.make()
.expand(),
.make(),
],
)
: SizedBox()

@ -1,3 +1,4 @@
import 'package:akuCommunity/constants/config.dart';
import 'package:flutter/material.dart';
import 'package:amap_flutter_location/amap_flutter_location.dart';
@ -160,7 +161,7 @@ class AppProvider extends ChangeNotifier {
// Location get location => _location;
getWeather() async {
Response response = await Dio().get(
'https://api.caiyunapp.com/v2.5/YETFbiaWktYHfCQE/${_location['longitude']},${_location['latitude']}/realtime.json',
'https://api.caiyunapp.com/v2.5/${AppConfig.caiYunAPI}/${_location['longitude']},${_location['latitude']}/realtime.json',
);
LoggerData.addData(response);
_weatherModel = RealTimeWeatherModel.fromJson(response.data);

Loading…
Cancel
Save