Flutter 如何解决;处理事务时出现VM异常:气体耗尽“;

Flutter 如何解决;处理事务时出现VM异常:气体耗尽“;,flutter,truffle,ganache,Flutter,Truffle,Ganache,在处理事务时,我遇到了VM异常:合同中的气体不足错误 这是我的truffle-config.js文件 development: { "http://127.0.0.1:8545"), host: "127.0.0.1", // Localhost (default: none) port: 8545, // Standard Ethereum port (default: none) ne

在处理事务时,我遇到了VM异常:合同中的气体不足错误

这是我的truffle-config.js文件

   development: {
 "http://127.0.0.1:8545"),
     host: "127.0.0.1",     // Localhost (default: none)
     port: 8545,            // Standard Ethereum port (default: none)
     network_id: "*",
     gas: 7984452,
     gasPrice: 25000000000,// Any network (default: none)
    },
我的偏头痛档案

1_initial_migration.js

const Migrations = artifacts.require("Migrations");

module.exports = function (deployer) {
  deployer.deploy(Migrations );
};
2_deploy_contracts.js

const Storage = artifacts.require("Storage");
  
module.exports = function (deployer) {
  deployer.deploy(Storage );
};
contract.sol文件

   function addFood(string calldata _name, string calldata _origin ) external returns (uint) {
        foods.push(Food(++number, _name, _origin));
        chainLengthCount[number]++;

        return number;
    }
契约\u licking.dart文件

  addFood(String name, String origin) async {

    // Getting the current name declared in the smart contract.
    isLoading = true;
    notifyListeners();
    var number = await _client.sendTransaction(
        _credentials,
        Transaction.callContract(
            contract: _contract, function: _addFood, parameters: [ name, origin]));
    
    return number;
  }
这是一个错误

我该怎么办?请帮帮我!!ㅠㅠ