Skip to content

Commit

Permalink
20240322 update
Browse files Browse the repository at this point in the history
  • Loading branch information
neko0xff committed Mar 22, 2024
1 parent 26815f4 commit 6b5233a
Show file tree
Hide file tree
Showing 31 changed files with 128 additions and 136 deletions.
2 changes: 1 addition & 1 deletion src/demo/viewapp_master/lib/pages/btn/ctr/modeChoose.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class btnGoBack extends StatelessWidget {
Navigator.push(
context, MaterialPageRoute(builder: (context) => AccountData()));
},
child: const Text('Go Back'),
child: const Text('回上頁'),
style: ElevatedButton.styleFrom(minimumSize: const Size(100, 80)),
);
}
Expand Down
4 changes: 2 additions & 2 deletions src/demo/viewapp_master/lib/pages/btn/ctr/switchCtr.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class ControlPage extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
SizedBox(height: 10.0),
Text("Switch Control",
Text("開關控制",
style: TextStyle(fontSize: 30, fontWeight: FontWeight.bold)),
SizedBox(height: 10.0),
Text("Switch01",
Expand Down Expand Up @@ -67,7 +67,7 @@ class btnGoBack extends StatelessWidget {
Navigator.push(
context, MaterialPageRoute(builder: (context) => Control()));
},
child: const Text('Go Back'),
child: const Text('回上頁'),
style: ElevatedButton.styleFrom(minimumSize: const Size(100, 80)),
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/demo/viewapp_master/lib/pages/btn/ctr/valueCtr.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class btnGoBack extends StatelessWidget {
Navigator.push(
context, MaterialPageRoute(builder: (context) => Control()));
},
child: const Text('Go Back'),
child: const Text('回上頁'),
style: ElevatedButton.styleFrom(minimumSize: const Size(100, 80)),
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/demo/viewapp_master/lib/pages/btn/table/aqiTable.dart
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class btnGoBack extends StatelessWidget {
Navigator.push(
context, MaterialPageRoute(builder: (context) => NewsData()));
},
child: const Text('Go Back'),
child: const Text('回上頁'),
style: ElevatedButton.styleFrom(minimumSize: const Size(100, 80)),
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class btnGoBack extends StatelessWidget {
Navigator.push(
context, MaterialPageRoute(builder: (context) => NewsData()));
},
child: const Text('Go Back'),
child: const Text('回上頁'),
style: ElevatedButton.styleFrom(minimumSize: const Size(100, 80)),
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/demo/viewapp_master/lib/pages/btn/table/modeTable.dart
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class btnGoBack extends StatelessWidget {
Navigator.push(
context, MaterialPageRoute(builder: (context) => AccountData()));
},
child: const Text('Go Back'),
child: const Text('回上頁'),
style: ElevatedButton.styleFrom(minimumSize: const Size(100, 80)),
);
}
Expand Down
4 changes: 2 additions & 2 deletions src/demo/viewapp_master/lib/pages/btn/view/Cfoot_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class DataAQI extends StatelessWidget {
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text("碳排放(自動)",
Text("碳排放",
style: TextStyle(fontSize: 30, fontWeight: FontWeight.bold)),
SizedBox(width: 10),
]),
Expand Down Expand Up @@ -174,7 +174,7 @@ class btnGoBack extends StatelessWidget {
context, MaterialPageRoute(builder: (context) => const NewsData()));
},
style: ElevatedButton.styleFrom(minimumSize: const Size(100, 80)),
child: const Text('Go Back'),
child: const Text('回上頁'),
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class btnGoBack extends StatelessWidget {
context, MaterialPageRoute(builder: (context) => ViewData()));
},
// ignore: sort_child_properties_last
child: const Text('Go Back'),
child: const Text('回上頁'),
style: ElevatedButton.styleFrom(minimumSize: const Size(100, 80)));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class btnGoBack extends StatelessWidget {
Navigator.push(
context, MaterialPageRoute(builder: (context) => AccountData()));
},
child: const Text('Go Back'),
child: const Text('回上頁'),
style: ElevatedButton.styleFrom(minimumSize: const Size(100, 80)),
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class btnGoBack extends StatelessWidget {
Navigator.push(
context, MaterialPageRoute(builder: (context) => ViewData()));
},
child: const Text('Go Back'),
child: const Text('回上頁'),
style: ElevatedButton.styleFrom(minimumSize: const Size(100, 80)));
}
}
4 changes: 2 additions & 2 deletions src/demo/viewapp_master/lib/pages/btn/view/tableView.dart
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class btn1 extends StatelessWidget {
MaterialPageRoute(builder: (context) => CreatePDFViewPage()));
},
style: ElevatedButton.styleFrom(minimumSize: const Size(100, 80)),
child: Text('Create a PDF'));
child: Text('建立PDF檔'));
}
}

Expand All @@ -96,7 +96,7 @@ class btnGoBack extends StatelessWidget {
context, MaterialPageRoute(builder: (context) => ViewData()));
},
style: ElevatedButton.styleFrom(minimumSize: const Size(100, 80)),
child: const Text('Go Back'),
child: const Text('回上頁'),
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class btnGoBack extends StatelessWidget {
Navigator.push(
context, MaterialPageRoute(builder: (context) => AccountData()));
},
child: const Text('Go Back'),
child: const Text('回上頁'),
style: ElevatedButton.styleFrom(minimumSize: const Size(100, 80)),
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class btnGoBack extends StatelessWidget {
Navigator.push(
context, MaterialPageRoute(builder: (context) => AccountData()));
},
child: const Text('Go Back'),
child: const Text('回上頁'),
style: ElevatedButton.styleFrom(minimumSize: const Size(100, 80)),
);
}
Expand Down
4 changes: 2 additions & 2 deletions src/demo/viewapp_master/lib/pages/out/control.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class btn1 extends StatelessWidget {
MaterialPageRoute(builder: (context) => switchCtrPage()));
},
style: ElevatedButton.styleFrom(minimumSize: const Size(150, 100)),
child: Text('Switch'));
child: Text('開關控制'));
}
}

Expand All @@ -73,6 +73,6 @@ class btn2 extends StatelessWidget {
context, MaterialPageRoute(builder: (context) => valueCtrPage()));
},
style: ElevatedButton.styleFrom(minimumSize: const Size(150, 100)),
child: Text('User\nCustom\nValue', textAlign: TextAlign.center));
child: Text('使用者\n自訂值', textAlign: TextAlign.center));
}
}
2 changes: 1 addition & 1 deletion src/demo/viewapp_master/lib/pages/out/news.dart
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class btn3 extends StatelessWidget {
Navigator.push(
context, MaterialPageRoute(builder: (context) => CfootPage_api()));
},
child: Text('碳排放\n自動', textAlign: TextAlign.center));
child: Text('碳排放', textAlign: TextAlign.center));
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/demo/viewapp_master/lib/pages/out/view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class btn1 extends StatelessWidget {
MaterialPageRoute(builder: (context) => tableViewPage()));
},
style: ElevatedButton.styleFrom(minimumSize: const Size(150, 100)),
child: Text('Table', textAlign: TextAlign.center));
child: Text('表格', textAlign: TextAlign.center));
}
}

Expand All @@ -79,7 +79,7 @@ class btn2 extends StatelessWidget {
MaterialPageRoute(builder: (context) => barchartViewPage()));
},
style: ElevatedButton.styleFrom(minimumSize: const Size(150, 100)),
child: Text('Bar\nChart', textAlign: TextAlign.center));
child: Text('長條圖', textAlign: TextAlign.center));
}
}

Expand All @@ -94,6 +94,6 @@ class btn3 extends StatelessWidget {
MaterialPageRoute(builder: (context) => linecartViewPage()));
},
style: ElevatedButton.styleFrom(minimumSize: const Size(150, 100)),
child: Text('Line\nChart', textAlign: TextAlign.center));
child: Text('折線圖', textAlign: TextAlign.center));
}
}
11 changes: 7 additions & 4 deletions src/demo/viewapp_master/lib/pages/widget/switch01ctr.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
import 'package:viewapp_master/modules/PreferencesUtil.dart';

var Color_active = Colors.green;
var Color_inactive = Colors.blue;

class Switch01ctr extends StatefulWidget {
const Switch01ctr({super.key});

Expand Down Expand Up @@ -132,11 +135,11 @@ class Fan1ctr extends StatelessWidget {
const SizedBox(width: 10),
Switch(
value: switchSelectedFan1,
activeColor: Colors.blue,
activeColor: Color_active,
onChanged: onChanged,
overlayColor: overlayColor,
thumbColor: const MaterialStatePropertyAll<Color>(Colors.black),
inactiveTrackColor: Colors.green,
inactiveTrackColor: Color_inactive,
),
],
);
Expand Down Expand Up @@ -183,11 +186,11 @@ class Fan2ctr extends StatelessWidget {
const SizedBox(width: 10),
Switch(
value: switchSelectedFan2,
activeColor: Colors.blue,
activeColor: Color_active,
onChanged: onChanged,
overlayColor: overlayColor,
thumbColor: const MaterialStatePropertyAll<Color>(Colors.black),
inactiveTrackColor: Colors.green,
inactiveTrackColor: Color_inactive,
),
],
);
Expand Down
36 changes: 18 additions & 18 deletions src/demo/viewapp_user/lib/pages/btn/ctr/switchCtr.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,23 @@ class ControlPage extends StatelessWidget {
Widget build(BuildContext context) {
return SingleChildScrollView(
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
SizedBox(height: 10.0),
Text("Switch Control",
style: TextStyle(fontSize: 30, fontWeight: FontWeight.bold)),
SizedBox(height: 10.0),
Text("Switch01",
style: TextStyle(fontSize: 25, fontWeight: FontWeight.bold)),
SizedBox(height: 10.0),
Control1(),
SizedBox(height: 10.0),
btnGoBack(),
SizedBox(height: 5.0),
wallpaperLogin(),
],
));
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
SizedBox(height: 10.0),
Text("開關控制",
style: TextStyle(fontSize: 30, fontWeight: FontWeight.bold)),
SizedBox(height: 10.0),
Text("Switch01",
style: TextStyle(fontSize: 25, fontWeight: FontWeight.bold)),
SizedBox(height: 10.0),
Control1(),
SizedBox(height: 10.0),
btnGoBack(),
SizedBox(height: 5.0),
wallpaperLogin(),
],
));
}
}

Expand All @@ -67,7 +67,7 @@ class btnGoBack extends StatelessWidget {
Navigator.push(
context, MaterialPageRoute(builder: (context) => Control()));
},
child: const Text('Go Back'),
child: const Text('回上頁'),
style: ElevatedButton.styleFrom(minimumSize: const Size(100, 80)),
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/demo/viewapp_user/lib/pages/btn/ctr/valueCtr.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class btnGoBack extends StatelessWidget {
Navigator.push(
context, MaterialPageRoute(builder: (context) => Control()));
},
child: const Text('Go Back'),
child: const Text('回上頁'),
style: ElevatedButton.styleFrom(minimumSize: const Size(100, 80)),
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/demo/viewapp_user/lib/pages/btn/table/aqiTable.dart
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class btnGoBack extends StatelessWidget {
Navigator.push(
context, MaterialPageRoute(builder: (context) => NewsData()));
},
child: const Text('Go Back'),
child: const Text('回上頁'),
style: ElevatedButton.styleFrom(minimumSize: const Size(100, 80)),
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/demo/viewapp_user/lib/pages/btn/table/cfootTable.dart
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class btnGoBack extends StatelessWidget {
Navigator.push(
context, MaterialPageRoute(builder: (context) => NewsData()));
},
child: const Text('Go Back'),
child: const Text('回上頁'),
style: ElevatedButton.styleFrom(minimumSize: const Size(100, 80)),
);
}
Expand Down
6 changes: 3 additions & 3 deletions src/demo/viewapp_user/lib/pages/btn/view/Cfoot.dart
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class DataAQI extends StatelessWidget {
Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: [ btn1(),SizedBox(width: 10), btn2() ]),
children: [ btn5(),SizedBox(width: 10), btn4() ]),
SizedBox(height: 10),
Row(
mainAxisSize: MainAxisSize.min,
Expand All @@ -74,12 +74,12 @@ class DataAQI extends StatelessWidget {
Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: [ btn4() ]),
children: [ btn1() ]),
SizedBox(height: 10),
Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: [ btn5() ]),
children: [ btn2() ]),
SizedBox(height: 10),
btnGoBack(),
],
Expand Down
2 changes: 1 addition & 1 deletion src/demo/viewapp_user/lib/pages/btn/view/barchartView.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class btnGoBack extends StatelessWidget {
context, MaterialPageRoute(builder: (context) => ViewData()));
},
// ignore: sort_child_properties_last
child: const Text('Go Back'),
child: const Text('回上一頁'),
style: ElevatedButton.styleFrom(minimumSize: const Size(100, 80)));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class btnGoBack extends StatelessWidget {
Navigator.push(
context, MaterialPageRoute(builder: (context) => ViewData()));
},
child: const Text('Go Back'),
child: const Text('回上頁'),
style: ElevatedButton.styleFrom(minimumSize: const Size(100, 80)));
}
}
4 changes: 2 additions & 2 deletions src/demo/viewapp_user/lib/pages/btn/view/tableView.dart
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class btn1 extends StatelessWidget {
MaterialPageRoute(builder: (context) => CreatePDFViewPage()));
},
style: ElevatedButton.styleFrom(minimumSize: const Size(100, 80)),
child: Text('Create a PDF'));
child: Text('建立PDF檔'));
}
}

Expand All @@ -89,7 +89,7 @@ class btnGoBack extends StatelessWidget {
context, MaterialPageRoute(builder: (context) => ViewData()));
},
style: ElevatedButton.styleFrom(minimumSize: const Size(100, 80)),
child: const Text('Go Back'),
child: const Text('回上頁'),
);
}
}
Loading

0 comments on commit 6b5233a

Please sign in to comment.