{"id":22506130,"url":"https://github.com/panditsamik/bitcoin-ticker","last_synced_at":"2026-04-18T01:01:18.641Z","repository":{"id":218140293,"uuid":"610935966","full_name":"panditsamik/Bitcoin-Ticker","owner":"panditsamik","description":null,"archived":false,"fork":false,"pushed_at":"2023-03-07T20:27:48.000Z","size":85,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-06T10:08:56.766Z","etag":null,"topics":["api","bitcoin-api","cupertino-widgets","dart","dropdownbutton","http-requests"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/panditsamik.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-03-07T19:27:21.000Z","updated_at":"2024-01-19T22:28:03.000Z","dependencies_parsed_at":"2024-01-20T00:38:37.242Z","dependency_job_id":null,"html_url":"https://github.com/panditsamik/Bitcoin-Ticker","commit_stats":null,"previous_names":["panditsamik/bitcoin-ticker"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/panditsamik/Bitcoin-Ticker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panditsamik%2FBitcoin-Ticker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panditsamik%2FBitcoin-Ticker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panditsamik%2FBitcoin-Ticker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panditsamik%2FBitcoin-Ticker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/panditsamik","download_url":"https://codeload.github.com/panditsamik/Bitcoin-Ticker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panditsamik%2FBitcoin-Ticker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31952206,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"ssl_error","status_checked_at":"2026-04-18T00:39:20.671Z","response_time":62,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","bitcoin-api","cupertino-widgets","dart","dropdownbutton","http-requests"],"created_at":"2024-12-07T00:40:48.294Z","updated_at":"2026-04-18T01:01:18.606Z","avatar_url":"https://github.com/panditsamik.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bitcoin Ticker\n\nA Flutter project that gives the current rates and exchange rates of Bitcoin currencies in different currencies, e.g. - USD, INR etc, through API, built in iOS style, i.e. it uses Cupertino Picker effect.\n\n## Link to the API:\n\u003chttps://rest.coinapi.io/v1/exchangerate/$bitcoinCurrency/$currency?apikey=${apiKey}\u003e\n\n##### Examples of API calls\n\u003chttps://rest.coinapi.io/v1/exchangerate/LTC/USD?apikey=${apiKey}\u003e\n\n#### For more information :\n\u003chttps://www.coinapi.io/\u003e\n\nFor Documentation of Exchange Rates :\n[Link](https://docs.coinapi.io/market-data/rest-api/exchange-rates)\n\nFor help getting started with Flutter development, view the\n[online documentation](https://docs.flutter.dev/), which offers tutorials,\nsamples, guidance on mobile development, and a full API reference.\n\n\n## Documentation and References :\n\n## http 0.13.5\nA composable, Future-based library for making HTTP requests.\n\nThis package contains a set of high-level functions and classes that make it easy to consume HTTP resources. It's multi-platform, and supports mobile, desktop, and the browser.\n\n#### Use this package as a library\nDepend on it\nRun this command:\n\nWith Flutter:\n\n```\ndart pub add http\n```\n\n```\ndependencies:\n  http: ^0.13.5\n```\n\n#### Import it\nNow in your Dart code, you can use:\n```\nimport 'package:http/http.dart';\n```\n\n## Fetch data from the internet\nFetching data from the internet is necessary for most apps. Luckily, Dart and Flutter provide tools, such as the http package, for this type of work.\n\nThis recipe uses the following steps:\n\n- Add the http package.\n- Make a network request using the http package.\n- Convert the response into a custom Dart object.\n- Fetch and display the data with Flutter.\n\n### 1. Add the http package\nThe http package provides the simplest way to fetch data from the internet.\n\nTo install the http package, add it to the dependencies section of the pubspec.yaml file. You can find the latest version of the http package the pub.dev.\n```\ndependencies:\n  http: \u003clatest_version\u003e\n\n```\n\nImport the http package\n```\nimport 'package:http/http.dart' as http;\n```\nAdditionally, in your AndroidManifest.xml file, add the Internet permission.\n```\n\u003c!-- Required to fetch data from the internet. --\u003e\n\u003cuses-permission android:name=\"android.permission.INTERNET\" /\u003e\n\n```\n\n\n### 2. Make a network request\n```\nFuture\u003chttp.Response\u003e fetchAlbum() {\n  return http.get(Uri.parse('https://jsonplaceholder.typicode.com/albums/1'));\n}\n```\n\n### Complete example\n\n```\nimport 'dart:async';\nimport 'dart:convert';\n\nimport 'package:flutter/material.dart';\nimport 'package:http/http.dart' as http;\n\nFuture\u003cAlbum\u003e fetchAlbum() async {\n  final response = await http\n      .get(Uri.parse('https://jsonplaceholder.typicode.com/albums/1'));\n\n  if (response.statusCode == 200) {\n    // If the server did return a 200 OK response,\n    // then parse the JSON.\n    return Album.fromJson(jsonDecode(response.body));\n  } else {\n    // If the server did not return a 200 OK response,\n    // then throw an exception.\n    throw Exception('Failed to load album');\n  }\n}\n\nclass Album {\n  final int userId;\n  final int id;\n  final String title;\n\n  const Album({\n    required this.userId,\n    required this.id,\n    required this.title,\n  });\n\n  factory Album.fromJson(Map\u003cString, dynamic\u003e json) {\n    return Album(\n      userId: json['userId'],\n      id: json['id'],\n      title: json['title'],\n    );\n  }\n}\n\nvoid main() =\u003e runApp(const MyApp());\n\nclass MyApp extends StatefulWidget {\n  const MyApp({super.key});\n\n  @override\n  State\u003cMyApp\u003e createState() =\u003e _MyAppState();\n}\n\nclass _MyAppState extends State\u003cMyApp\u003e {\n  late Future\u003cAlbum\u003e futureAlbum;\n\n  @override\n  void initState() {\n    super.initState();\n    futureAlbum = fetchAlbum();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return MaterialApp(\n      title: 'Fetch Data Example',\n      theme: ThemeData(\n        primarySwatch: Colors.blue,\n      ),\n      home: Scaffold(\n        appBar: AppBar(\n          title: const Text('Fetch Data Example'),\n        ),\n        body: Center(\n          child: FutureBuilder\u003cAlbum\u003e(\n            future: futureAlbum,\n            builder: (context, snapshot) {\n              if (snapshot.hasData) {\n                return Text(snapshot.data!.title);\n              } else if (snapshot.hasError) {\n                return Text('${snapshot.error}');\n              }\n\n              // By default, show a loading spinner.\n              return const CircularProgressIndicator();\n            },\n          ),\n        ),\n      ),\n    );\n  }\n}\n```\n\n\n### For more information :\n[Link](https://docs.flutter.dev/cookbook/networking/fetch-data)\n\n## Android Style\n### Flutter – DropDownButton Widget:\n\nIn Flutter, A DropDownButton is a material design button. The DropDownButton is a widget that we can use to select one unique value from a set of values. It lets the user select one value from a number of items. The default value shows the currently selected value. We can even include a down arrow icon on the list. On clicking the DropDownButton it opens a list  of items, from which the user can select the desired option.\n\n#### Flutter DropDownButton Constructor:\n#### Syntax:\n\n```\nDropdownButton(\n{Key key, \n@required List\u003cDropdownMenuItem\u003cT\u003e\u003e items, \nDropdownButtonBuilder selectedItemBuilder, \nT value, \nWidget hint, \nWidget disabledHint, \n@required ValueChanged\u003cT\u003e onChanged, \nVoidCallback onTap, \nint elevation: 8, \nTextStyle style, \nWidget underline, \nWidget icon, \nColor iconDisabledColor, \nColor iconEnabledColor, \ndouble iconSize: 24.0, \nbool isDense: false, \nbool isExpanded: false, \ndouble itemHeight: kMinInteractiveDimension,\nColor focusColor, \nFocusNode focusNode, \nbool autofocus: false, \nColor dropdownColor\n}\n)\n```\n\n### Code:\n```\nchild: Column(\n            mainAxisAlignment: MainAxisAlignment.center,\n            children: [\n              DropdownButton(\n                // Initial Value\n                value: dropdownvalue,\n                // Down Arrow Icon\n                icon: const Icon(Icons.keyboard_arrow_down),\n                // Array list of items\n                items: currenciesList.map((String items) {\n                  return DropdownMenuItem(\n                    value: items,\n                    child: Text(\n                      items,\n                      style: TextStyle(\n                        color: Colors.white,\n                        fontSize: 20.0,\n                        letterSpacing: 1.5,\n                      ),\n                    ),\n                  );\n                }).toList(),\n                // After selecting the desired option,it will\n                // change button value to selected value\n                onChanged: (String? newValue) {\n                  Future.delayed(const Duration(microseconds: 5), () {\n                    refreshData1();\n                    refreshData2();\n                    refreshData3();\n                  });\n                  setState(() {\n                    dropdownvalue = newValue!;\n                    currency = newValue;\n                  });\n                },\n              ),\n            ],\n          ),\n```\n\n\n## iOS style:\n### CupertinoPicker class\n\nAn iOS-styled picker.\n\nDisplays its children widgets on a wheel for selection and calls back when the currently selected item changes.\n\nBy default, the first child in children will be the initially selected child. The index of a different child can be specified in scrollController, to make that child the initially selected child.\n\nCan be used with showCupertinoModalPopup to display the picker modally at the bottom of the screen. When calling showCupertinoModalPopup, be sure to set semanticsDismissible to true to enable dismissing the modal via semantics.\n\n\n#### Import it\nNow in your Dart code, you can use:\n\n```\nimport 'package:flutter/cupertino.dart';\n```\n\nCode :\n\n```\n void _showDialog(Widget child) {\n    showCupertinoModalPopup\u003cvoid\u003e(\n        context: context,\n        builder: (BuildContext context) =\u003e Container(\n              height: 216,\n              padding: const EdgeInsets.only(top: 6.0),\n              // The Bottom margin is provided to align the popup above the system navigation bar.\n              margin: EdgeInsets.only(\n                bottom: MediaQuery.of(context).viewInsets.bottom,\n              ),\n              // Provide a background color for the popup.\n              color: CupertinoColors.systemBackground.resolveFrom(context),\n              // Use a SafeArea widget to avoid system overlaps.\n              child: SafeArea(\n                top: false,\n                child: child,\n              ),\n            ));\n  }\n\n```\n\n```\nchild: Row(\n            mainAxisAlignment: MainAxisAlignment.center,\n            children: \u003cWidget\u003e[\n              const Text(\n                'Selected Currency: ',\n                style: TextStyle(\n                  color: Colors.white,\n                  fontSize: 22.0,\n                  letterSpacing: 1.5,\n                ),\n              ),\n              CupertinoButton(\n                padding: EdgeInsets.zero,\n                // Display a CupertinoPicker with list of currencies.\n                onPressed: () =\u003e _showDialog(\n                  CupertinoPicker(\n                    magnification: 1.22,\n                    squeeze: 1.2,\n                    useMagnifier: true,\n                    itemExtent: 32.0,\n                    // This is called when selected item is changed.\n                    onSelectedItemChanged: (int selectedItem) {\n                      Future.delayed(const Duration(microseconds: 5), () {\n                        refreshData1();\n                        refreshData2();\n                        refreshData3();\n                      });\n                      setState(() {\n                        index1 = selectedItem;\n                        dropdownvalue = currenciesList[index1];\n                        currency = currenciesList[index1];\n                      });\n                    },\n                    children: List\u003cWidget\u003e.generate(currenciesList.length,\n                        (int index) {\n                      return Center(\n                        child: Text(\n                          currenciesList[index],\n                        ),\n                      );\n                    }),\n                  ),\n                ),\n                // This displays the selected currency name.\n                child: Text(\n                  currenciesList[index1],\n                  style: const TextStyle(\n                    fontWeight: FontWeight.bold,\n                    color: Colors.blue,\n                    fontSize: 20.5,\n                    letterSpacing: 1.5,\n                  ),\n                ),\n              ),\n            ],\n          ),\n```\n\n## Screenshots:\n\n![WhatsApp Image 2023-03-08 at 12 52 55 AM](https://user-images.githubusercontent.com/91545371/223544480-341a6f8c-2e37-463d-aa3f-8b9110bab6a0.jpeg)\n\n\n![WhatsApp Image 2023-03-08 at 12 52 56 AM](https://user-images.githubusercontent.com/91545371/223544510-1b8e02cb-4f67-490f-baac-e2e76889110f.jpeg)\n\n\n\n## Video:\n\nhttps://user-images.githubusercontent.com/91545371/223544617-34150224-d437-4a57-afd7-170fd6222dfb.mp4\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpanditsamik%2Fbitcoin-ticker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpanditsamik%2Fbitcoin-ticker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpanditsamik%2Fbitcoin-ticker/lists"}