Fund management app based on Flutter

There are only three pages in the whole project, including the favorites list on the home page, the details page to enter by clicking the list, and the search page. StatefulWidget is not used in the whole project, and all the states are managed by the Provider. It’s hard to imagine Google designing it.)

Based on iphone11pro do adaptation, if you need to package Android or other may need a simple adjustment for learning to use only, source code github.com/NoBugBoy/jj like can point a star thank you

The home page can show market information, and the fund that collects

The data will be cached in sharedPreferences, and the APP will not be lost when it restarts. The value of the list can be refreshed when the page is dropped down, and the page will be refreshed automatically after the timer is configured to refresh once in 1.5 seconds

Swipe left and right on the page list to delete favorites, and use Provider to manage status

Future getList(){
  Future f  =  matchJJName();
  f.then((value) => {
    dataList = value,
    notifyListeners()
  });
Copy the code

The data source of the entire App is the Api of Climb Daily Fund

 Future<List<Map>> matchJJName() async {
    Uri uri1 =  Uri.parse(URL);
    var request1 = await httpClient.getUrl(uri1);
    var response1 = await request1.close();
    String responseBody1 = await response1.transform(utf8.decoder).join();
    int begin = responseBody1.indexOf("diff")+6;
    String newstr = responseBody1.substring(begin,responseBody1.length-2);
    var dplsit = json.decode(newstr);
    this.dplsit = dplsit;

   String code = this.codes.join(",");
    Uri uri =  Uri.parse(URL);
    var request = await httpClient.getUrl(uri);
    var response = await request.close();
    String responseBody = await response.transform(utf8.decoder).join();
    String newStr = responseBody.substring(17);
    newStr = newStr.substring(0,newStr.length-3);
    List<String> split = newStr.split(""");
    
    int i =0;
    List<Map> list = List();
    for (String value in split) {
        if(i%2 == 0){
          List<String> model = value.split(",");
          Map m = new Map();
          m.addEntries({
            MapEntry("code", model[0]),
            MapEntry("name", model[1]),
            MapEntry("jz", model[4]),
            MapEntry("zdf", model[5]),
            MapEntry("now", model[6]),
          });
          list.add(m);
        }
        i++;
    }
    return list;
  }
Copy the code

Details page

Click the list will enter the details of the fund, showing the history of daily ups and downs (from the creation of the fund to today’s all the data), the rate of return and other information

Search (fuzzy matching) can be entered by the plus sign in the upper right corner of the home page. Click “Join” to join the home page. At this time, the data will be saved to sharedPreferences, and the data will still exist next time you open the app