hi I want to send token with my api url i tried it by concatenate the token with api url but not. it's showing the error you cannot call the value on null. i cannot figure it out. any help from your side should be appreciate.

This is my api code:

class APIService {
  String baseurl = "https://b2all.live/api";
  var log = Logger();
  FlutterSecureStorage storage = FlutterSecureStorage();

  //old get

  Future get(String url) async {
    await storage.read(key: "api_token");
    url = formater(url);
    // /user/register
    var response = await http.get(
      url,
    );
    if (response.statusCode == 200) {
      log.i(response.body);
      return json.decode(response.body);
    }
    log.i(response.body);
    log.i(response.statusCode);
  }

  String formater (String url) {
    return baseurl+url;
  }
}

And this is my fetching data from api code:

 @override
  void initState() {
    super.initState();
    fetchData();
  }

  void fetchData() async {
    var preferences = await SharedPreferences.getInstance();
    String api_token = preferences.getString('api_token');
    print(api_token);

    var response = await networkHandler.get(
        "/profile/DvIXUN1CAgYMQzKri0dx3XVxfcABDjbPEg1QyHVD4vu1pQM8pRF56OjLgVW8");

    setState(() {
      profileModelFix = ProfileModelFix.fromJson(response);
      circular = false;
    });
   }

this is my model file. it's showing error on model. but i cannot figure it out. any help from your side will be helpful for me.

import 'package:flutter/foundation.dart';
import 'package:json_annotation/json_annotation.dart';

part 'profileModelFix.g.dart';

@JsonSerializable()
class ProfileModelFix {
  String name;
  String user_name;
  String dob;
  String phone;
  String gender;
  String bio;
  String api_token;

  ProfileModelFix ({

    this.name, this.user_name, this.dob, this.phone, this.gender, this.bio, this.api_token,
  });

  factory ProfileModelFix.fromJson(Map<String,dynamic> json) =>
      _$ProfileModelFixFromJson(json);
  Map<String,dynamic> toJson() => _$ProfileModelFixToJson(this);

}