我试图添加一个背景图像到我的颤音应用程序,我已经经历了所有类似的问题。应用程序m运行良好,但图像没有出现。
下面是我的小部件代码:
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
// Here we take the value from the MyHomePage object that was created by
// the App.build method,
只是为了练习API,我正在开发这个应用程序。按钮是排成一行的,背景图片是附加的,但在我们添加背景图片后,一些美观就减少了。该应用程序的代码为: CustomButton.dart: this is class for the button.
import 'package:flutter/material.dart';
class CustomButton{
var buttonName;
CustomButton(this.buttonName);
Widget homeButtons(){
return Material(