如何在Flutter中调用接口

时间:2019-07-09 06:46:58

标签: performance flutter dart

我正在尝试从首页刷新其他页面 怎么可能,有人帮我刷新其他页面

这是我的代码

abstract class IsSilly {
  void makePeopleLaugh();
}


class _NewOrderScreenState extends State<NewOrderScreen>
    with AutomaticKeepAliveClientMixin<NewOrderScreen>,IsSilly


@override
  void makePeopleLaugh() {
    setState(() {
      isLoading=true;
    });
  }

与其他页面相同,如何刷新。; ....

1 个答案:

答案 0 :(得分:0)

private String getBase64String(Bitmap bitmap) {

    // give your image file url in mCurrentPhotoPath
    ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
    bitmap.compress(Bitmap.CompressFormat.JPEG, 100, byteArrayOutputStream);
    byte[] byteArray = byteArrayOutputStream.toByteArray();
    return Base64.encodeToString(byteArray, Base64.DEFAULT);
}