Skip to content

Commit

Permalink
Merge pull request #7 from jspmic/development
Browse files Browse the repository at this point in the history
fix: Performance issue fixes
  • Loading branch information
jspmic authored Nov 24, 2024
2 parents c294d0c + 56e79c4 commit c46883d
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 13 deletions.
8 changes: 4 additions & 4 deletions lib/custom_widgets.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ void list(int column, {String? district}) async{
}

void initialize({String? district}){
if (district != null){
if (district != null && !(cache2.containsKey(district))){
list(DISTRICT+5, district: district);
return;
}
Expand Down Expand Up @@ -98,10 +98,10 @@ class _StockState extends State<Stock> {
@override
void initState(){
_hintCopy = widget.hintText;
super.initState();
if (widget.district != null){
/*if (widget.district != null){
list(DISTRICT+5, district: widget.district);
}
}*/
super.initState();
}

@override
Expand Down
1 change: 0 additions & 1 deletion lib/livraison.dart
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ class _LivraisonScreenState extends State<LivraisonScreen> {
Text("Logistic Official: ${objLivraison.logistic_official}"),
Text("District: ${objLivraison.district}"),
Text("Stock Central Depart: ${objLivraison.stock_central_depart}"),
Text("Utilisateur: ${objLivraison.user}"),
],
)),
),
Expand Down
1 change: 0 additions & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'dart:convert';

import 'package:flutter/material.dart';
import 'package:soft/custom_widgets.dart';
import 'package:soft/rest.dart';
Expand Down
2 changes: 1 addition & 1 deletion lib/rest.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import 'package:flutter_dotenv/flutter_dotenv.dart';

// Address definition
const String HOST = "https://jspemic.pythonanywhere.com";
// const String HOST = "http://192.168.43.43:5000";
// const String HOST = "http://192.168.43.81:5000";


class Transfert{
Expand Down
10 changes: 5 additions & 5 deletions lib/screen2.dart
Original file line number Diff line number Diff line change
Expand Up @@ -149,15 +149,15 @@ class _Screen2State extends State<Screen2> {
objLivraison.plaque = plaque.text;
objLivraison.date = "${dateSelected?.day}/${dateSelected?.month}/${dateSelected?.year}";
objLivraison.logistic_official = logistic_official.text;
objLivraison.boucle = {};
objLivraison.boucle = {};
objLivraison.numero_mouvement = numero_mvt.text;
List<Widget> boucleFromScreen2 = [];
count = 0;
oneBoucle = [];
List<Widget> boucleFromScreen2 = [];
count = 0;
oneBoucle = [];
Navigator.pushNamed(context, "/livraison",
arguments: livraison.ScreenTransition(backgroundColor: background, fieldColor: fieldColor,
objlivraison: objLivraison,
boucleFromScreen2: boucleFromScreen2
boucleFromScreen2: boucleFromScreen2
)
);
},
Expand Down
1 change: 0 additions & 1 deletion lib/transfert.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ class _TransfertScreenState extends State<TransfertScreen> {
Text("Plaque: ${objTransfert.plaque}"),
Text("Logistic Official: ${objTransfert.logistic_official}"),
Text("Stock Central Depart: ${objTransfert.stock_central_depart}"),
Text("Utilisateur: ${objTransfert.user}"),
],
),
)),
Expand Down

0 comments on commit c46883d

Please sign in to comment.