Dio library key working perfectly fine in my case if we pass small case key value
For example,
Dio dio = new Dio();
dio.options.headers['content-Type'] = 'application/json';
dio.options.headers["authorization"] = "token ${token}";
response = await dio.post(url, data: data);
make sure you write key in small case, that’s work for me.
Related Contents:
- Flutter Dio : How to Upload Image?
- Flutter: how to make a TextField with HintText but no Underline?
- Force Flutter navigator to reload state when popping
- Flutter how to programmatically exit the app
- How to create a circle icon button in Flutter?
- How to make flutter app responsive according to different screen size?
- Navigator operation requested with a context that does not include a Navigator
- How to present an empty view in flutter?
- Custom Card Shape Flutter SDK
- Flutter: Unimplemented handling of missing static target
- Life cycle in flutter
- What is the difference between primaryColor and primarySwatch in Flutter?
- How to use Expanded in SingleChildScrollView?
- How to work with progress indicator in flutter?
- Make container widget fill parent vertically
- Flutter : How to add a Header Row to a ListView
- Flutter Layout Row / Column – share width, expand height
- What assert do in dart?
- Flutter web can’t load network image from another domain
- Placing two trailing icons in ListTile
- “iproxy” cannot be opened because the developer cannot be verified
- Target of URI doesn’t exist: ‘package:flutter_gen/gen_l10n/gallery_localizations.dart’
- How to add bottom elevation to a container in Flutter?
- Open drawer on clicking AppBar
- How to make flutter app draw behind android navigation bar and make navigation bar fully transparent?
- How can I change the background color of a textbutton in flutter?
- flutter how to give height to the childrens of GridView.Builder
- Getting ‘Horizontal viewport was given unbounded height.’ with TabBarView in flutter
- Make buttons in a row have the same width in flutter
- Provider vs. Get_it
- How to get theme color inside the widget in Flutter
- Error: Either zero or 2 or more [DropdownMenuItem]s were detected with the same value I/flutter (18363): ‘package:flutter/src/material/dropdown.dart’:
- Could not open settings generic class cache for settings file ‘
- TabBarView with dynamic Container height
- Switch case with multiple values for the same case
- setState does not update TextFormField when use initialValue
- Flutter – How to make a custom TabBar
- a class method named ._() function in dart?
- Bottom overflow by 30px
- How to get full size of a ScrollController
- Flutter GridView is not scrolling
- Flutter: Best way to get all values in a form
- Store data as an object in shared preferences in flutter
- Add border Radius in the Inkwell widget in flutter
- How to enable Flutter internet permission for macos desktop app?
- “AVOID using library private types in public APIs” – lint warning, even in in cookbook examples?
- Making an Image widget disabled / grayed out
- Flutter – How create Container with width match parent?
- Flutter gridview inside listview
- Detect ‘enter key’ press in flutter