๐
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void main() { | |
| String date = json['sheet']![0]['date']!; | |
| String key = json['sheet']![0]['date']!; | |
| List<Map<String, String>> outPut = []; | |
| print(json['sheet']?.map((e){ | |
| for(int i=1;i<=4;i++){ | |
| outPut.add({ | |
| "date": date, | |
| "uniqueKey": key, | |
| "city$i":e["city$i"]! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void main() { | |
| List<int> array = [25, 23, 21, 16, 5, 10, 12, 16, 18]; | |
| int l =0 , r=array.length - 1; | |
| while (l < r) { | |
| int mid = l + (r-l)~/2; | |
| if (array[mid] < array[mid + 1]) { | |
| r = mid; | |
| } | |
| else { | |
| l = mid + 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void main() { | |
| print('Hello, World!'); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Widget listItem({int index, String title, IconData icon}) { | |
| final GlobalKey expansionTileKey = GlobalKey(); | |
| return Material( | |
| color: Colors.transparent, | |
| child: Theme( | |
| data: ThemeData(accentColor: Colors.black), | |
| child: ExpansionTile( | |
| key: expansionTileKey, | |
| onExpansionChanged: (value) { | |
| if (value) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void _scrollToSelectedContent({GlobalKey expansionTileKey}) { | |
| final keyContext = expansionTileKey.currentContext; | |
| if (keyContext != null) { | |
| Future.delayed(Duration(milliseconds: 200)).then((value) { | |
| Scrollable.ensureVisible(keyContext, | |
| duration: Duration(milliseconds: 200)); | |
| }); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Widget cardWidget() { | |
| return Padding( | |
| padding: const EdgeInsets.only(top: 5.0, bottom: 8), | |
| child: Container( | |
| width: MediaQuery.of(context).size.width * 0.91, | |
| padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 15), | |
| decoration: BoxDecoration( | |
| color: Colors.white, | |
| borderRadius: BorderRadius.circular(8), | |
| boxShadow: [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Widget listItem({int index, String title, IconData icon}) { | |
| return Material( | |
| color: Colors.transparent, | |
| child: Theme( | |
| data: ThemeData(accentColor: Colors.black), | |
| child: ExpansionTile( | |
| leading: Icon( | |
| icon, | |
| size: 40, | |
| ), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ListView( | |
| shrinkWrap: true, | |
| primary: false, | |
| children: [ | |
| listItem(title: "See more", icon: Icons.dashboard_rounded), | |
| listItem(title: "Help & Support", icon: Icons.help_rounded), | |
| listItem(title: "Setting & Privacy", icon: Icons.settings), | |
| ListTile( | |
| leading: Icon( | |
| Icons.open_in_new_rounded, |
NewerOlder