Untitled

 avatar
unknown
dart
3 years ago
9.8 kB
3
Indexable
customerInfoTab(height, width) {
    return Padding(
      padding: EdgeInsets.only(left: width * 0.0125, right: width * 0.0125),
      child: Card(
          elevation: 30,
          shape: RoundedRectangleBorder(
              side: BorderSide(
                width: 6,
                color: Colors.green[800],
              ),
              borderRadius: BorderRadius.all(Radius.circular(width * 0.075))),
          child: Padding(
            padding: EdgeInsets.all(4.0),
            child: Container(
              decoration: BoxDecoration(
                borderRadius: BorderRadius.all(Radius.circular(width * 0.060)),
                gradient: LinearGradient(
                  begin: Alignment.centerLeft, //Starting point
                  end: Alignment.centerRight, //Ending point
                  stops: [
                    0.33,
                    0
                  ], //First Part is the amount of space the first color has
                  //occupy and the second parameter is the space that is to be occupied by
                  //mixture of both colors.
                  colors: [
                    Colors.green[800],
                    Colors.grey[50],
                  ], // List of colors
                ),
              ),
              child: Column(
                children: [
                  Expanded(
                      child: Column(
                    children: [
                      Expanded(flex: 1, child: SizedBox()),
                      Expanded(
                        flex: 6,
                        child: Row(children: [
                          Expanded(
                            flex: 1,
                            child: Row(
                              children: [
                                Expanded(flex: 4, child: SizedBox()),
                                Expanded(
                                  flex: 20,
                                  child: FittedBox(
                                      fit: BoxFit.contain,
                                      child: Text(
                                        "Müşteri",
                                        textAlign: TextAlign.center,
                                        style: TextStyle(color: Colors.white),
                                      )),
                                ),
                                Expanded(flex: 5, child: SizedBox()),
                              ],
                            ),
                          ),
                          Expanded(
                            flex: 2,
                            child: Center(
                              child: Row(
                                children: [
                                  Expanded(flex: 1, child: SizedBox()),
                                  Expanded(
                                    flex: 15,
                                    child: Padding(
                                      padding:
                                          EdgeInsets.only(left: 15, right: 15),
                                      child: AutoSizeText(
                                        GlobalV.currentCustomerName.isNotEmpty
                                            ? GlobalV.currentCustomerName
                                            : "-",
                                        maxLines: 2,
                                        style: TextStyle(
                                            color: Colors.blueGrey[700],
                                            fontSize: 200),
                                        textAlign: TextAlign.center,
                                      ),
                                    ),
                                  ),
                                  Expanded(flex: 1, child: SizedBox()),
                                ],
                              ),
                            ),
                          )
                        ]),
                      ),
                      Expanded(flex: 1, child: SizedBox()),
                    ],
                  )),
                  Divider(color: Colors.green[800], thickness: 3),
                  Expanded(
                      child: Column(
                    children: [
                      Expanded(flex: 1, child: SizedBox()),
                      Expanded(
                        flex: 8,
                        child: Row(children: [
                          Expanded(
                            flex: 1,
                            child: Row(
                              children: [
                                Expanded(flex: 4, child: SizedBox()),
                                Expanded(
                                  flex: 20,
                                  child: FittedBox(
                                      fit: BoxFit.contain,
                                      child: Text(
                                        "Durum",
                                        style: TextStyle(color: Colors.white),
                                      )),
                                ),
                                Expanded(flex: 5, child: SizedBox()),
                              ],
                            ),
                          ),
                          Expanded(
                            flex: 2,
                            child: Row(
                              children: [
                                Expanded(flex: 1, child: SizedBox()),
                                Expanded(
                                  flex: 20,
                                  child: AutoSizeText(
                                    myState == null
                                        ? "Henüz bir iş aktif değil, eğer bu sayfayı görüntülüyorsanız uygulamaya yeniden giriş yapın."
                                        : myState == 0
                                            ? "İş kabul edildi, müşterinin alınması bekleniyor"
                                            : "Müşteri alındı, seyahati tamamlamanız bekleniyor",
                                    maxLines: 2,
                                    textAlign: TextAlign.center,
                                    style: TextStyle(
                                        fontSize: 100,
                                        color: Colors.blueGrey[700]),
                                  ),
                                ),
                                Expanded(flex: 1, child: SizedBox()),
                              ],
                            ),
                          )
                        ]),
                      ),
                      Expanded(flex: 1, child: SizedBox()),
                    ],
                  )),
                  Divider(color: Colors.green[800], thickness: 3),
                  Expanded(
                      child: Column(
                    children: [
                      Expanded(flex: 1, child: SizedBox()),
                      Expanded(
                        flex: 9,
                        child: Row(children: [
                          Expanded(
                            flex: 1,
                            child: Row(
                              children: [
                                Expanded(flex: 3, child: SizedBox()),
                                Expanded(
                                  flex: 20,
                                  child: FittedBox(
                                      fit: BoxFit.contain,
                                      child: Padding(
                                        padding: EdgeInsets.all(width * 0.0075),
                                        child: Text(
                                          "Adres",
                                          textAlign: TextAlign.center,
                                          style: TextStyle(color: Colors.white),
                                        ),
                                      )),
                                ),
                                Expanded(flex: 5, child: SizedBox()),
                              ],
                            ),
                          ),
                          Expanded(
                            flex: 2,
                            child: Row(
                              children: [
                                Expanded(flex: 1, child: SizedBox()),
                                Expanded(
                                  flex: 20,
                                  child: AutoSizeText(
                                    (myState == null
                                        ? "-"
                                        : myState == 0
                                            ? (startAddress.isNotEmpty
                                                ? startAddress
                                                : "-")
                                            : (endAddress.isNotEmpty
                                                ? endAddress
                                                : "-")),
                                    maxLines: 3,
                                    style: TextStyle(
                                        color: Colors.blueGrey[700],
                                        fontSize: 100),
                                  ),
                                ),
                                Expanded(flex: 1, child: SizedBox()),
                              ],
                            ),
                          )
                        ]),
                      ),
                      Expanded(flex: 1, child: SizedBox()),
                    ],
                  )),
                ],
              ),
            ),
          )),
    );
  }
Editor is loading...