How can I put the photo I got from the internet at the top of the screen?

Viewed 46
body: controller.homeResponseList!.isEmpty
      ? const Center(child: CircularProgressIndicator())
      : ListView.builder(
          scrollDirection: Axis.horizontal,
          itemCount: controller.homeResponseList!.length,
          itemBuilder: (context, index) => Padding(
                padding: const EdgeInsets.all(8.0),
                child: GestureDetector(
                  onTap: () => Navigator.push(
                    context,
                    MaterialPageRoute(
                      builder: (context) => InfoScreen(
                          url: controller.homeResponseList![index].url!),
                    ),
                  ),
                  child: Padding(
                    padding: const EdgeInsets.all(200.0),
                    child: Row(children: [
                      Image.network(
                          controller.homeResponseList![index].urlToImage ??
                              ""),
                    ]),
                  ),
                ),
              )),

As you can see from the photo, my picture is right in the middle of the screen. I want to place it at the top of the screen.

1 Answers

before your body with a Column() it will automatically be at the top, also you can use mainAxisAlignment: MainAxisAlignment.start in the column widget

Related