Only static members can be accessed in initializer. Dart2.0
问题 I am using banklist in stateful widget. passing list to pageState using List<Bank> bankLists = this.widget.bankLists; Que 1. Why I am getting error at gradientcolor: gradientBankCard("FFB74093","FFB74093")) that only static members can be accessed in initializer? Que 2. How to pass const Data to gradientBankCard method . for Example I want to pass Color.fromRGBO(220, 132, 58, 1.0) to Arguments that gives error to. I List<Bank> bankLists = [ Bank( id: "1", name: "B1", loanAmount: "₹ 250000",