Flutter问题:在多行描述值上获取错误

问题描述 投票:0回答:1

我有一个多行描述,如下所示:

List<Hymnal> _items = [
Hymnal(
    id: '1',
    indexNumber: '001',
    title: 'O Worship the Lord',
    hymns: 
    " 1
      O worship the Lord in the beauty of holiness,
      Bow down before Him, His glory proclaim;
      With gold of obedience, and incense of lowliness,
      Kneel and adore Him: the Lord is His name.")];

上面的代码行引起了一些问题,因为我猜到赞美诗的格式。这是硬编码的,我只是将其放在Hymns.dart中。有关如何解决此问题的任何建议?

flutter
1个回答
0
投票
hymns: ''' 1 O worship the Lord in the beauty of holiness, Bow down before Him, His glory proclaim; With gold of obedience, and incense of lowliness, Kneel and adore Him: the Lord is His name.'''

This可以提供帮助。

© www.soinside.com 2019 - 2024. All rights reserved.